Added clearer debug logging to createOrLookup

This commit is contained in:
Alvaro 2022-12-02 18:05:27 -07:00 committed by GitHub
parent bc4f3dcd01
commit e41252b35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 55 additions and 4 deletions

View file

@ -1062,6 +1062,7 @@ export class SignalProtocolStore extends EventEmitter {
const conversation = window.ConversationController.lookupOrCreate({
uuid: uuid.toString(),
reason: 'SignalProtocolStore.storeSession',
});
strictAssert(
conversation !== undefined,
@ -1393,6 +1394,7 @@ export class SignalProtocolStore extends EventEmitter {
// First, fetch this conversation
const conversation = window.ConversationController.lookupOrCreate({
uuid: uuid.toString(),
reason: 'SignalProtocolStore.lightSessionReset',
});
assertDev(conversation, `lightSessionReset/${id}: missing conversation`);