Add --delete-account argument to completely delete an account

This commit is contained in:
AsamK 2021-05-03 00:03:31 +02:00
parent c79860b493
commit 0091c1cf26
3 changed files with 21 additions and 1 deletions

View file

@ -406,6 +406,11 @@ public class Manager implements Closeable {
// 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());
account.setRegistered(false);
}
public void deleteAccount() throws IOException {
accountManager.deleteAccount();
account.setRegistered(false);