From 832a5c6e1165018e7855b90f8476d654f77c205a Mon Sep 17 00:00:00 2001 From: Renato Alcara Date: Tue, 27 Jan 2026 09:26:54 -0300 Subject: [PATCH] fix: use correct nested biz node structure for interactive messages Changes the biz node from flat structure (biz > native_flow) to nested structure (biz > interactive > native_flow) as used by Pastorini/Astra-Api. Structure: - biz: {} - interactive: { type: 'native_flow', v: '1' } - native_flow: { v: '9', name: 'mixed' } This fixes error 479 that was breaking all interactive messages. Co-Authored-By: Claude Opus 4.5 --- src/Socket/messages-send.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index 942d0608..484e7328 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -1137,13 +1137,27 @@ 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 ;(stanza.content as BinaryNode[]).push({ tag: 'biz', attrs: {}, content: [ { - tag: buttonType, - attrs: getButtonArgs(message) + tag: 'interactive', + attrs: { + type: 'native_flow', + v: '1' + }, + content: [ + { + tag: 'native_flow', + attrs: { + v: '9', + name: 'mixed' + } + } + ] } ] })