mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Improve JSON-RPC subscribeReceive method with subscription id
This commit is contained in:
parent
e5a8cdb056
commit
be0993c5d8
9 changed files with 158 additions and 43 deletions
|
@ -10,6 +10,8 @@ public interface MultiAccountManager extends AutoCloseable {
|
|||
|
||||
List<String> getAccountNumbers();
|
||||
|
||||
List<Manager> getManagers();
|
||||
|
||||
void addOnManagerAddedHandler(Consumer<Manager> handler);
|
||||
|
||||
void addOnManagerRemovedHandler(Consumer<Manager> handler);
|
||||
|
|
|
@ -49,6 +49,13 @@ public class MultiAccountManagerImpl implements MultiAccountManager {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Manager> getManagers() {
|
||||
synchronized (managers) {
|
||||
return new ArrayList<>(managers);
|
||||
}
|
||||
}
|
||||
|
||||
void addManager(final Manager m) {
|
||||
synchronized (managers) {
|
||||
if (managers.contains(m)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue