Compare commits

...

2 Commits

Author SHA1 Message Date
Renato Alcara b0d1531455 chore: remove temporary VO_TRACE debug logger.info from handleMessage 2026-04-21 15:06:34 -03:00
Renato Alcara 81215cec15 chore: remove temporary [VO_RAW] debug logs from handleMessage 2026-04-21 14:57:21 -03:00
-17
View File
@@ -2241,13 +2241,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
}
const handleMessage = async (node: BinaryNode) => {
const _encNode = getBinaryNodeChild(node, 'enc')
const _unavNode = getBinaryNodeChild(node, 'unavailable')
// VO_RAW: log BEFORE any filtering — captures every stanza that enters handleMessage
console.log(`[VO_RAW] id=${node.attrs.id} from=${node.attrs.from} type=${node.attrs.type} enc=${_encNode ? _encNode.attrs?.type : 'NO'} unavailable=${_unavNode ? _unavNode.attrs?.type : 'NO'} children=${Array.isArray(node.content) ? (node.content as BinaryNode[]).map(c => c.tag).join(',') : 'none'}`)
if (shouldIgnoreJid(node.attrs.from!) && node.attrs.from !== S_WHATSAPP_NET) {
console.log(`[VO_RAW] IGNORED by shouldIgnoreJid: ${node.attrs.from}`)
logger.trace({ from: node.attrs.from }, 'ignored message')
await sendMessageAck(node)
return
@@ -2256,17 +2250,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const encNode = getBinaryNodeChild(node, 'enc')
const unavailableNode = getBinaryNodeChild(node, 'unavailable')
// DEBUG: log every incoming message stanza to trace view-once delivery
logger.info({
id: node.attrs.id,
from: node.attrs.from,
type: node.attrs.type,
hasEnc: !!encNode,
encType: encNode?.attrs?.type,
hasUnavailable: !!unavailableNode,
unavailableType: unavailableNode?.attrs?.type,
}, 'VO_TRACE: incoming message stanza')
// msmsg block removed — allow msmsg decryption (required for view-once on linked devices)
if (unavailableNode?.attrs?.type === 'view_once') {
const { fullMessage: voMsg } = decryptMessageNode(