From 8b1af33e9736beae02832305e6984d91d6a40162 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Feb 2026 04:51:46 +0000 Subject: [PATCH] fix(list-message): enable biz node for listMessage delivery getButtonType was returning undefined for listMessage, preventing the existing product_list biz node from being injected. Changes: - getButtonType returns 'list' for message.listMessage (line 632) - getButtonType returns 'list' for innerMessage.listMessage (line 675) - Exclude list messages from bot node injection (line 1325) https://claude.ai/code/session_01SJdSHiUxtwzV8bb5dedodb --- src/Socket/messages-send.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index ccd97825..27456ca5 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -628,8 +628,8 @@ export const makeMessagesSocket = (config: SocketConfig) => { } else if (message.templateMessage) { return 'template' } else if (message.listMessage) { - // listMessage works natively without biz node - return undefined + // All listMessages (SINGLE_SELECT and PRODUCT_LIST) need biz > list node + return 'list' } else if (message.buttonsResponseMessage) { return 'buttons_response' } else if (message.listResponseMessage) { @@ -671,8 +671,8 @@ export const makeMessagesSocket = (config: SocketConfig) => { } else if (innerMessage.templateMessage) { return 'template' } else if (innerMessage.listMessage) { - // listMessage works natively without biz node - return undefined + // All listMessages (SINGLE_SELECT and PRODUCT_LIST) need biz > list node + return 'list' } else if (innerMessage.buttonsResponseMessage) { return 'buttons_response' } else if (innerMessage.listResponseMessage) { @@ -1322,7 +1322,7 @@ export const makeMessagesSocket = (config: SocketConfig) => { destinationJid?.endsWith('@c.us') ) && !isJidBot(destinationJid) - if (isPrivateUserChat && !isCarousel && !isCatalog) { + if (isPrivateUserChat && !isCarousel && !isCatalog && buttonType !== 'list') { ;(stanza.content as BinaryNode[]).push({ tag: 'bot', attrs: { biz_bot: '1' }