Better logging for sealed sender, sender key distribution
This commit is contained in:
parent
18140c4a9d
commit
eba182f8d0
3 changed files with 10 additions and 8 deletions
|
@ -911,7 +911,7 @@ export default class MessageReceiver extends EventTarget {
|
|||
return `${sender}.${envelope.sourceDevice} ${timestamp} (${envelope.id})`;
|
||||
}
|
||||
|
||||
return envelope.id;
|
||||
return `${timestamp} (${envelope.id})`;
|
||||
}
|
||||
|
||||
private clearRetryTimeout(): void {
|
||||
|
@ -1322,8 +1322,6 @@ export default class MessageReceiver extends EventTarget {
|
|||
const originalSource = envelope.source;
|
||||
const originalSourceUuid = envelope.sourceUuid;
|
||||
|
||||
const unidentifiedLogId = this.getEnvelopeId(envelope);
|
||||
|
||||
const newEnvelope: DecryptedEnvelope = {
|
||||
...envelope,
|
||||
|
||||
|
@ -1385,10 +1383,11 @@ export default class MessageReceiver extends EventTarget {
|
|||
);
|
||||
}
|
||||
|
||||
const unidentifiedLogId = this.getEnvelopeId(newEnvelope);
|
||||
|
||||
if (newEnvelope.serverTimestamp > certificate.expiration()) {
|
||||
const envelopeId = this.getEnvelopeId(newEnvelope);
|
||||
throw new Error(
|
||||
`MessageReceiver.decryptSealedSender: Sender certificate is expired for envelope ${envelopeId}`
|
||||
`MessageReceiver.decryptSealedSender: Sender certificate is expired for envelope ${unidentifiedLogId}`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1912,6 +1912,9 @@ export default class MessageSender {
|
|||
): Promise<CallbackResultType> {
|
||||
const contentMessage = new Proto.Content();
|
||||
const timestamp = Date.now();
|
||||
window.log.info(
|
||||
`sendSenderKeyDistributionMessage: Sending ${distributionId} with timestamp ${timestamp}`
|
||||
);
|
||||
|
||||
const senderKeyDistributionMessage = await this.getSenderKeyDistributionMessage(
|
||||
distributionId
|
||||
|
|
|
@ -621,7 +621,7 @@ async function markIdentifierUnregistered(identifier: string) {
|
|||
);
|
||||
|
||||
conversation.setUnregistered();
|
||||
await window.Signal.Data.saveConversation(conversation.attributes);
|
||||
await window.Signal.Data.updateConversation(conversation.attributes);
|
||||
|
||||
await window.textsecure.storage.protocol.archiveAllSessions(identifier);
|
||||
}
|
||||
|
@ -975,7 +975,7 @@ async function resetSenderKey(conversation: ConversationModel): Promise<void> {
|
|||
memberDevices: [],
|
||||
},
|
||||
});
|
||||
await window.Signal.Data.saveConversation(conversation.attributes);
|
||||
await window.Signal.Data.updateConversation(conversation.attributes);
|
||||
}
|
||||
|
||||
function getAccessKey(
|
||||
|
@ -1047,7 +1047,7 @@ async function fetchKeysForIdentifier(
|
|||
emptyConversation.set({
|
||||
sealedSender: SEALED_SENDER.DISABLED,
|
||||
});
|
||||
await window.Signal.Data.saveConversation(emptyConversation.attributes);
|
||||
await window.Signal.Data.updateConversation(emptyConversation.attributes);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.name === 'UnregisteredUserError') {
|
||||
|
|
Loading…
Reference in a new issue