fix(carousel): match Pastorini's EXACT working structure

Pastorini's carousel renders on WhatsApp Web. Key differences found
by comparing logs and screenshot:

1. Direct interactiveMessage at root (NO viewOnceMessage wrapper)
   - messageKeys: ['interactiveMessage'] in Pastorini logs
   - Previous attempts with viewOnce V1/V2 all failed on Web

2. Root header WITH title + hasMediaAttachment: false (restored)

3. messageVersion: 1 in carouselMessage (restored)

4. tctoken included in stanza (was being skipped for carousel)
   - Pastorini stanza: ['participants','device-identity','tctoken','biz']

5. messageContextInfo at message root level (kept)

https://claude.ai/code/session_018DkDxsjWzM131jy3ivWjZp
This commit is contained in:
Claude
2026-02-07 03:19:03 +00:00
parent 4e7fb3fdce
commit 9a36602acf
2 changed files with 25 additions and 33 deletions
+2 -4
View File
@@ -1457,11 +1457,9 @@ export const makeMessagesSocket = (config: SocketConfig) => {
}
}
// Skip tctoken for carousel messages - not present in working implementations
// and may cause error 479 on linked devices
const isCarouselForTcToken = isCarouselMessage(message)
// Pastorini's working carousel includes tctoken in stanza
const contactTcTokenData =
!isGroup && !isRetryResend && !isStatus && !isCarouselForTcToken ? await authState.keys.get('tctoken', [destinationJid]) : {}
!isGroup && !isRetryResend && !isStatus ? await authState.keys.get('tctoken', [destinationJid]) : {}
const tcTokenBuffer = contactTcTokenData[destinationJid]?.token