Add extra logging for change phone number

This commit is contained in:
Fedor Indutny 2022-01-20 14:44:25 -08:00 committed by GitHub
parent bcd9f961ad
commit 8cd557ff91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 14 deletions

View file

@ -1870,7 +1870,7 @@ export class ConversationModel extends window.Backbone
this.set('e164', e164);
if (oldValue) {
this.addChangeNumberNotification();
this.addChangeNumberNotification(oldValue, e164);
}
window.Signal.Data.updateConversation(this.attributes);
@ -3220,7 +3220,10 @@ export class ConversationModel extends window.Backbone
this.set('pendingUniversalTimer', undefined);
}
async addChangeNumberNotification(): Promise<void> {
async addChangeNumberNotification(
oldValue: string,
newValue: string
): Promise<void> {
const sourceUuid = this.getCheckedUuid(
'Change number notification without uuid'
);
@ -3236,7 +3239,7 @@ export class ConversationModel extends window.Backbone
log.info(
`Conversation ${this.idForLogging()}: adding change number ` +
`notification for ${sourceUuid.toString()}`
`notification for ${sourceUuid.toString()} from ${oldValue} to ${newValue}`
);
const convos = [