fix: suppress libsignal session logs + add carousel media warning

1. Suppress verbose "Closing session: SessionEntry {...}" logs from
   libsignal that dump cryptographic keys/ratchets to console.log

2. Add warning when carousel cards don't have media attachments -
   WhatsApp Web requires every card to have hasMediaAttachment:true
   with actual image/video (per ckptw reference implementation)

3. Add carousel structure summary log for debugging card composition

https://claude.ai/code/session_018DkDxsjWzM131jy3ivWjZp
This commit is contained in:
Claude
2026-02-07 02:40:43 +00:00
parent 479f53a8bc
commit 52b8e8b4ff
2 changed files with 39 additions and 0 deletions
+11
View File
@@ -22,6 +22,17 @@ import { SenderKeyRecord } from './Group/sender-key-record'
import { GroupCipher, GroupSessionBuilder, SenderKeyDistributionMessage } from './Group'
import { LIDMappingStore } from './lid-mapping'
// Suppress verbose "Closing session: SessionEntry {...}" logs from libsignal
// These are raw console.log calls from the native Signal library that dump
// cryptographic session details (keys, ratchets, etc.) on every encrypt/decrypt
const _origConsoleLog = console.log
console.log = function(...args: unknown[]) {
if (args.length > 0 && typeof args[0] === 'string' && args[0].startsWith('Closing session')) {
return // suppress libsignal session dump
}
_origConsoleLog.apply(console, args)
}
// ============================================
// Identity Key Detection Constants
// ============================================