fix(carousel): pular injeção do biz node para carrossel (causa erro 479)
O código experimental de injeção do biz node tentava extrair botões de interactiveMessage.nativeFlowMessage.buttons (nível raiz), mas no carrossel os botões estão em carouselMessage.cards[].nativeFlowMessage. Resultado: biz node injetado com buttonNames:[] e dados vazios, WhatsApp via erro 479 rejeitando a mensagem nos dispositivos vinculados. Pastorini usa relayMessage direto sem injetar biz node no carrossel. Agora o carrossel pula a injeção do biz node completamente. https://claude.ai/code/session_01EK9NpViRCtda1WAvFd8ptR
This commit is contained in:
@@ -1225,7 +1225,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
// EXPERIMENTAL: Try biz node injection for ALL interactive messages including catalog
|
// EXPERIMENTAL: Try biz node injection for ALL interactive messages including catalog
|
||||||
// Previously we skipped catalog messages but they weren't rendering properly
|
// Previously we skipped catalog messages but they weren't rendering properly
|
||||||
if (buttonType && enableInteractiveMessages) {
|
if (buttonType && enableInteractiveMessages && !isCarousel) {
|
||||||
const startTime = Date.now()
|
const startTime = Date.now()
|
||||||
|
|
||||||
// Debug: Log message structure to diagnose list detection
|
// Debug: Log message structure to diagnose list detection
|
||||||
@@ -1384,6 +1384,12 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
)
|
)
|
||||||
metrics.interactiveMessagesFailures.inc({ type: buttonType, reason: 'injection_failed' })
|
metrics.interactiveMessagesFailures.inc({ type: buttonType, reason: 'injection_failed' })
|
||||||
}
|
}
|
||||||
|
} else if (isCarousel && buttonType) {
|
||||||
|
logger.info(
|
||||||
|
{ msgId, buttonType, to: destinationJid },
|
||||||
|
'[EXPERIMENTAL] Skipping biz node injection for carousel message (not needed, causes error 479)'
|
||||||
|
)
|
||||||
|
metrics.interactiveMessagesSent.inc({ type: 'carousel' })
|
||||||
} else if (buttonType && !enableInteractiveMessages) {
|
} else if (buttonType && !enableInteractiveMessages) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
{ msgId, buttonType },
|
{ msgId, buttonType },
|
||||||
|
|||||||
Reference in New Issue
Block a user