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

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);
}