mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Implement unregister command for jsonrpc and dbus daemon
This commit is contained in:
parent
b78573021d
commit
c73c58723c
11 changed files with 98 additions and 9 deletions
|
@ -64,6 +64,8 @@ public class SignalJsonRpcDispatcherHandler {
|
|||
|
||||
if (!noReceiveOnStart) {
|
||||
c.getAccountNumbers().stream().map(c::getManager).filter(Objects::nonNull).forEach(this::subscribeReceive);
|
||||
c.addOnManagerAddedHandler(this::subscribeReceive);
|
||||
c.addOnManagerRemovedHandler(this::unsubscribeReceive);
|
||||
}
|
||||
|
||||
handleConnection();
|
||||
|
@ -76,6 +78,9 @@ public class SignalJsonRpcDispatcherHandler {
|
|||
subscribeReceive(m);
|
||||
}
|
||||
|
||||
final var currentThread = Thread.currentThread();
|
||||
m.addClosedListener(currentThread::interrupt);
|
||||
|
||||
handleConnection();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue