Added clearer debug logging to createOrLookup
This commit is contained in:
parent
bc4f3dcd01
commit
e41252b35e
21 changed files with 55 additions and 4 deletions
|
@ -1257,7 +1257,17 @@ export async function mergeAccountRecord(
|
|||
let conversation: ConversationModel | undefined;
|
||||
|
||||
if (contact) {
|
||||
conversation = window.ConversationController.lookupOrCreate(contact);
|
||||
if (!contact.uuid && !contact.e164) {
|
||||
log.error(
|
||||
'storageService.mergeAccountRecord: No uuid or e164 on contact'
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
conversation = window.ConversationController.lookupOrCreate({
|
||||
uuid: contact.uuid,
|
||||
e164: contact.e164,
|
||||
reason: 'storageService.mergeAccountRecord',
|
||||
});
|
||||
} else if (legacyGroupId && legacyGroupId.length) {
|
||||
const groupId = Bytes.toBinary(legacyGroupId);
|
||||
conversation = window.ConversationController.get(groupId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue