From 20b5a4703d5c53b4a66621f435d35b293848852c Mon Sep 17 00:00:00 2001 From: Renato Alcara Date: Fri, 6 Mar 2026 21:25:52 -0300 Subject: [PATCH] fix: skip biz node for carousel messages (fixes WhatsApp Web rendering) Carousel messages must NOT include the biz XML node in the stanza. The biz node causes WhatsApp Web to render only the header instead of the full carousel with cards. Android and iOS are unaffected. Confirmed via Frida capture of working implementation (Pastorini): carousel stanza has NO biz node, NO bot node. Change: add `&& !isCarousel` to biz node injection condition. Co-Authored-By: Claude Opus 4.6 --- src/Socket/messages-send.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index df0e9727..fec3b5d4 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -1253,12 +1253,12 @@ export const makeMessagesSocket = (config: SocketConfig) => { const isCarousel = isCarouselMessage(message) // Collect biz/bot nodes to append AFTER device-identity and tctoken - // Stanza order: participants → device-identity → tctoken → biz - // The biz node MUST be last for WhatsApp Web carousel rendering + // Stanza order: participants → device-identity → tctoken → biz (when applicable) + // Carousel messages must NOT have biz node (breaks WhatsApp Web rendering) const deferredNodes: BinaryNode[] = [] - // Inject biz node for interactive messages (including carousel) - if (buttonType && enableInteractiveMessages) { + // Inject biz node for interactive messages (skip carousel — biz node breaks Web rendering) + if (buttonType && enableInteractiveMessages && !isCarousel) { const startTime = Date.now() // Debug: Log message structure to diagnose list detection