feat(history): fortify contact data extraction with fallbacks
feat(history): fortify contact data extraction with fallbacks
This commit is contained in:
@@ -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 || '',
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user