fix(whatsapp): normalize device-qualified contact ids
This commit is contained in:
@@ -805,6 +805,7 @@ async function connectAccount(accountId) {
|
||||
id: jidNormalizedUser(sock.user.id),
|
||||
name: sock.user.name || account.name || account.phoneNumber,
|
||||
} : account.user
|
||||
delete account.lastError
|
||||
delete account.qrDataUrl
|
||||
delete account.pairingCode
|
||||
const session = sessions.get(accountId)
|
||||
@@ -1595,6 +1596,7 @@ app.get('/accounts/:id/chats/:jid/identity', async (req, res) => {
|
||||
phoneJid = jid
|
||||
}
|
||||
}
|
||||
phoneJid = jidNormalizedUser(phoneJid)
|
||||
const contact = store.contacts.get(jid) || store.contacts.get(phoneJid) || {}
|
||||
const group = jid.endsWith('@g.us')
|
||||
? await sock.groupMetadata(jid).catch(() => store.groups.get(jid))
|
||||
|
||||
Reference in New Issue
Block a user