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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user