feat(history): fortify contact data extraction with fallbacks

feat(history): fortify contact data extraction with fallbacks
This commit is contained in:
Renato Alcara
2026-01-22 16:50:33 -03:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -765,6 +765,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const setPicture = getBinaryNodeChild(node, 'set')
const delPicture = getBinaryNodeChild(node, 'delete')
// TODO: WAJIDHASH stuff proper support inhouse
ev.emit('contacts.update', [
{
id: jidNormalizedUser(node?.attrs?.from) || (setPicture || delPicture)?.attrs?.hash || '',
+2 -2
View File
@@ -326,8 +326,8 @@ export const processHistoryMessage = (item: proto.IHistorySync, logger?: ILogger
contacts.push({
id: chatId,
name: chat.name || undefined,
lid: chat.lidJid || undefined,
name: chat.displayName || chat.name || chat.username || undefined,
lid: chat.lidJid || chat.accountLid || undefined,
phoneNumber: chat.pnJid || undefined
})