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
This commit is contained in:
Claude
2026-02-06 04:51:46 +00:00
parent 61129699be
commit 8b1af33e97
+5 -5
View File
@@ -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' }