mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Rotate storageId after setting username
This commit is contained in:
parent
90b1e4bc02
commit
09e3e7f335
1 changed files with 3 additions and 0 deletions
|
@ -376,6 +376,7 @@ public class AccountHelper {
|
||||||
account.setUsername(username.getUsername());
|
account.setUsername(username.getUsername());
|
||||||
account.setUsernameLink(linkComponents);
|
account.setUsernameLink(linkComponents);
|
||||||
account.getRecipientStore().resolveSelfRecipientTrusted(account.getSelfRecipientAddress());
|
account.getRecipientStore().resolveSelfRecipientTrusted(account.getSelfRecipientAddress());
|
||||||
|
account.getRecipientStore().rotateSelfStorageId();
|
||||||
logger.debug("[confirmUsername] Successfully confirmed username.");
|
logger.debug("[confirmUsername] Successfully confirmed username.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,6 +410,7 @@ public class AccountHelper {
|
||||||
e.getClass().getSimpleName());
|
e.getClass().getSimpleName());
|
||||||
account.setUsername(null);
|
account.setUsername(null);
|
||||||
account.setUsernameLink(null);
|
account.setUsernameLink(null);
|
||||||
|
account.getRecipientStore().rotateSelfStorageId();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -431,6 +433,7 @@ public class AccountHelper {
|
||||||
account.setUsernameLink(linkComponents);
|
account.setUsernameLink(linkComponents);
|
||||||
logger.debug("[confirmUsername] Successfully reclaimed existing username and link.");
|
logger.debug("[confirmUsername] Successfully reclaimed existing username and link.");
|
||||||
}
|
}
|
||||||
|
account.getRecipientStore().rotateSelfStorageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tryToSetUsernameLink(Username username) {
|
private void tryToSetUsernameLink(Username username) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue