Reset pniCredential when our E164 changes

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2022-08-17 09:39:59 -07:00 committed by GitHub
parent ff6bf162e7
commit d32d1f7265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1873,6 +1873,11 @@ export class ConversationModel extends window.Backbone
if (e164 !== oldValue) {
this.set('e164', e164 || undefined);
// When our own number has changed - reset pniCredential
if (isMe(this.attributes)) {
this.set({ pniCredential: null });
}
if (oldValue && e164) {
this.addChangeNumberNotification(oldValue, e164);
}