From 6bcabb36789af41d8495af4a7ed25b46f4d6d86a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Feb 2026 02:14:36 +0000 Subject: [PATCH] fix(carousel): add messageContextInfo at outer Message level for multi-device The messageContextInfo with deviceListMetadata was only inside the V2 wrapper. relayMessage copies message.messageContextInfo to meMsg for sender's own devices (DSM), so it needs to be at the outer level too. https://claude.ai/code/session_018DkDxsjWzM131jy3ivWjZp --- src/Utils/messages.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Utils/messages.ts b/src/Utils/messages.ts index 8d57b4ff..daa1c718 100644 --- a/src/Utils/messages.ts +++ b/src/Utils/messages.ts @@ -1164,6 +1164,9 @@ export const generateWAMessageContent = async ( // Pass options for media processing if cards have images/videos const generated = await generateCarouselMessage(carouselOptions, options) m.viewOnceMessageV2 = generated.viewOnceMessageV2 + // messageContextInfo at the OUTER Message level too (not just inside the V2 wrapper) + // This ensures meMsg/DSM and multi-device routing get proper device list metadata + m.messageContextInfo = { deviceListMetadata: {}, deviceListMetadataVersion: 2 } options.logger?.info('Sending carousel with viewOnceMessageV2 wrapper (plain object, no proto conversion)') // Return the plain JS object directly WITHOUT calling WAProto.Message.fromObject() // This matches Pastorini's working approach where plain objects are passed directly