From 31e94123016757adcaa1a8aeca514695ee1f722d Mon Sep 17 00:00:00 2001 From: Nir Date: Thu, 2 Apr 2026 22:30:48 +0300 Subject: [PATCH] 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 --- src/controllers/messageController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/messageController.js b/src/controllers/messageController.js index 50784d0..f12a411 100644 --- a/src/controllers/messageController.js +++ b/src/controllers/messageController.js @@ -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 }