From 145209b2c2551546d2666465d011c4dc2848226c Mon Sep 17 00:00:00 2001 From: CORREIA Eduardo Date: Sat, 16 May 2026 21:34:01 -0300 Subject: [PATCH] fix(whatsapp): allow @lid contacts to bypass onWhatsApp validation After WhatsApp's LID (Linked Identity) migration, DMs to contacts that resolve to @lid JIDs fail with a BadRequestException because onWhatsApp returns exists:false for LID-based identifiers. Add @lid to the whitelist alongside @broadcast in both sendMessageWithTyping and sendPresence so these contacts are not rejected by the existence check. --- .../integrations/channel/whatsapp/whatsapp.baileys.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 10feb7ce1d..1d88d7081c 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -2096,7 +2096,7 @@ export class BaileysStartupService extends ChannelStartupService { ) { const isWA = (await this.whatsappNumber({ numbers: [number] }))?.shift(); - if (!isWA.exists && !isJidGroup(isWA.jid) && !isWA.jid.includes('@broadcast')) { + if (!isWA.exists && !isJidGroup(isWA.jid) && !isWA.jid.includes('@broadcast') && !isWA.jid.includes('@lid')) { throw new BadRequestException(isWA); } @@ -2344,7 +2344,7 @@ export class BaileysStartupService extends ChannelStartupService { const isWA = (await this.whatsappNumber({ numbers: [number] }))?.shift(); - if (!isWA.exists && !isJidGroup(isWA.jid) && !isWA.jid.includes('@broadcast')) { + if (!isWA.exists && !isJidGroup(isWA.jid) && !isWA.jid.includes('@broadcast') && !isWA.jid.includes('@lid')) { throw new BadRequestException(isWA); }