Fix message/reply endpoint with a @lid contactId (#121)
Avoid adding a contactId '@c.us' postfix if a '@lid' postfix exists, to support @lid ids as well Co-authored-by: nir <nir@severin>
This commit is contained in:
parent
f1ff7812c3
commit
31e9412301
1 changed files with 4 additions and 1 deletions
|
|
@ -519,7 +519,10 @@ const reply = async (req, res) => {
|
|||
break
|
||||
}
|
||||
case 'Contact': {
|
||||
const contactId = content.contactId.endsWith('@c.us') ? content.contactId : `${content.contactId}@c.us`
|
||||
const contactId =
|
||||
content.contactId.endsWith('@c.us') || content.contactId.endsWith('@lid')
|
||||
? content.contactId
|
||||
: `${content.contactId}@c.us`;
|
||||
contentMessage = await client.getContactById(contactId)
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue