From e1f744032a740a885d5236eacdc69795aa5bf288 Mon Sep 17 00:00:00 2001 From: Renato Alcara Date: Tue, 27 Jan 2026 09:40:04 -0300 Subject: [PATCH] fix: use correct interactive type for list messages For list messages, use type='list' instead of 'native_flow' in the biz node structure. This allows the list button to open properly. - native_flow messages: biz > interactive(type=native_flow) > native_flow - list messages: biz > interactive(type=list) > list Co-Authored-By: Claude Opus 4.5 --- src/Socket/messages-send.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index 484e7328..8b2df7c2 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -1137,8 +1137,11 @@ export const makeMessagesSocket = (config: SocketConfig) => { metrics.interactiveMessagesSent.inc({ type: buttonType }) try { - // Use nested structure: biz > interactive > native_flow - // This matches the working Pastorini/Astra-Api implementation + // Use nested structure: biz > interactive > [type] + // This matches the working Astra-Api implementation + // For native_flow: biz > interactive(type=native_flow) > native_flow + // For list: biz > interactive(type=list) > list + const interactiveType = buttonType === 'list' ? 'list' : 'native_flow' ;(stanza.content as BinaryNode[]).push({ tag: 'biz', attrs: {}, @@ -1146,12 +1149,12 @@ export const makeMessagesSocket = (config: SocketConfig) => { { tag: 'interactive', attrs: { - type: 'native_flow', + type: interactiveType, v: '1' }, content: [ { - tag: 'native_flow', + tag: interactiveType, attrs: { v: '9', name: 'mixed'