Reset pniCredential when our E164 changes

This commit is contained in:
Fedor Indutny 2022-08-17 09:22:59 -07:00 committed by GitHub
parent 9e4a0cfd9a
commit 16222f6092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1876,6 +1876,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);
}