From 825b8da8d90e55983322fb3243a63bdfb6309417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20dos=20Santos=20Junior?= <8673366+MarToxAk@users.noreply.github.com> Date: Mon, 23 Nov 2026 13:21:04 -0300 Subject: [PATCH] fix(whatsapp): only generate link preview when explicitly requested Link preview was enabled by default: it was only disabled when the caller passed linkPreview:false explicitly. On 2.4.0-rc2 (Baileys), the default path calls generateLinkPreview() for any message whose text contains a URL, and those messages fail to be delivered to the recipient (fixes #2762). Invert the default so the preview is generated only when linkPreview:true is passed explicitly. Callers that still want the preview can send linkPreview:true. Co-Authored-By: Claude Code --- .../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 22839fd451..882fb06ab9 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -2638,10 +2638,10 @@ export class BaileysStartupService extends ChannelStartupService { } } - const linkPreview = options?.linkPreview === false ? false : undefined; + const linkPreview = options?.linkPreview === true ? true : false; let previewContext: any = undefined; - if (linkPreview !== false && (message as any)?.conversation) { + if (linkPreview === true && (message as any)?.conversation) { previewContext = await this.generateLinkPreview((message as any).conversation); }