X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/92c1f16799cfa6a53e3512848cf31f54ac86e90d..be963ed49b6b32ab90707c453f8ce2c85b72e428:/src/main/java/org/asamk/signal/Manager.java diff --git a/src/main/java/org/asamk/signal/Manager.java b/src/main/java/org/asamk/signal/Manager.java index ab1f1191..a6dfcae5 100644 --- a/src/main/java/org/asamk/signal/Manager.java +++ b/src/main/java/org/asamk/signal/Manager.java @@ -356,6 +356,13 @@ class Manager implements Signal { save(); } + public void unregister() throws IOException { + // When setting an empty GCM id, the Signal-Server also sets the fetchesMessages property to false. + // 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.absent()); + } + public URI getDeviceLinkUri() throws TimeoutException, IOException { password = Util.getSecret(18);