From c084f138f23d0487d3ee3a02021b2b0d71e33b8f Mon Sep 17 00:00:00 2001 From: Renato Alcara Date: Tue, 27 Jan 2026 10:13:20 -0300 Subject: [PATCH] fix: use native_flow for all interactive messages to avoid error 479 Testing showed that using type='list' for list messages (even those using nativeFlowMessage with single_select) causes error 479 rejection. All interactive message types (buttons, lists, carousels) now use type='native_flow' in the biz node structure. Co-Authored-By: Claude Opus 4.5 --- src/Socket/messages-send.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index 6f1aed5c..627e538b 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -1176,13 +1176,10 @@ export const makeMessagesSocket = (config: SocketConfig) => { metrics.interactiveMessagesSent.inc({ type: buttonType }) try { - // 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 - // Note: Lists sent as nativeFlowMessage still need type='list' - const isListMessage = buttonType === 'list' || isListNativeFlow(message) - const interactiveType = isListMessage ? 'list' : 'native_flow' + // Use nested structure: biz > interactive > native_flow + // All interactive messages (buttons, lists, carousels) use native_flow + // Testing showed that type='list' causes error 479 + const interactiveType = 'native_flow' ;(stanza.content as BinaryNode[]).push({ tag: 'biz', attrs: {},