Remove registration lock pin before deleting account

This commit is contained in:
AsamK 2021-08-30 14:12:39 +02:00
parent 7a3522dc01
commit 1f0c2d5c78

View file

@ -385,6 +385,13 @@ public class Manager implements Closeable {
} }
public void deleteAccount() throws IOException { public void deleteAccount() throws IOException {
try {
pinHelper.removeRegistrationLockPin();
} catch (UnauthenticatedResponseException e) {
logger.warn("Failed to remove registration lock pin");
}
account.setRegistrationLockPin(null, null);
dependencies.getAccountManager().deleteAccount(); dependencies.getAccountManager().deleteAccount();
account.setRegistered(false); account.setRegistered(false);