]> nmode's Git Repositories - signal-cli/commitdiff
Update SignalAccount storage on unregister
authorJuergen Kurzmann <git@groupnet.at>
Sat, 3 Aug 2019 19:49:02 +0000 (21:49 +0200)
committerAsamK <asamk@gmx.de>
Thu, 5 Sep 2019 10:29:23 +0000 (12:29 +0200)
 - save registered false state in the SignalAccount storage on unregister action

src/main/java/org/asamk/signal/manager/Manager.java

index 575dde67052fd70a06a24674010a4483442e0776..8672684aa02a09ee4d5264f7825b533fb0f8694c 100644 (file)
@@ -209,6 +209,9 @@ public class Manager implements Signal {
         // If this is the master device, other users can't send messages to this number anymore.
         // If this is a linked device, other users can still send messages, but this device doesn't receive them anymore.
         accountManager.setGcmId(Optional.<String>absent());
         // If this is the master device, other users can't send messages to this number anymore.
         // If this is a linked device, other users can still send messages, but this device doesn't receive them anymore.
         accountManager.setGcmId(Optional.<String>absent());
+
+        account.setRegistered(false);
+        account.save();
     }
 
     public String getDeviceLinkUri() throws TimeoutException, IOException {
     }
 
     public String getDeviceLinkUri() throws TimeoutException, IOException {