setProfileKey: Additional logging for debugging oscillation
This commit is contained in:
parent
2c8555beaf
commit
669abab36a
2 changed files with 30 additions and 2 deletions
|
@ -85,6 +85,7 @@ import {
|
|||
decryptProfile,
|
||||
decryptProfileName,
|
||||
deriveAccessKey,
|
||||
hashProfileKey,
|
||||
} from '../Crypto';
|
||||
import { decryptAttachmentV2 } from '../AttachmentCrypto';
|
||||
import * as Bytes from '../Bytes';
|
||||
|
@ -4918,7 +4919,6 @@ export class ConversationModel extends window.Backbone
|
|||
reason,
|
||||
}: { viaStorageServiceSync?: boolean; reason: string }
|
||||
): Promise<boolean> {
|
||||
const logId = `setProfileKey(${this.idForLogging()}/${reason})`;
|
||||
const oldProfileKey = this.get('profileKey');
|
||||
|
||||
// profileKey is a string so we can compare it directly
|
||||
|
@ -4926,6 +4926,11 @@ export class ConversationModel extends window.Backbone
|
|||
return false;
|
||||
}
|
||||
|
||||
const serviceId = this.get('serviceId');
|
||||
const aci = isAciString(serviceId) ? serviceId : undefined;
|
||||
const profileKeyHash = aci ? hashProfileKey(profileKey, aci) : 'no-aci';
|
||||
const logId = `setProfileKey(${this.idForLogging()}/${profileKeyHash}/${reason})`;
|
||||
|
||||
log.info(`${logId}: Profile key changed. Setting sealedSender to UNKNOWN`);
|
||||
this.set({
|
||||
profileKeyCredential: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue