Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b0d1531455 | |||
| 81215cec15 |
@@ -2241,13 +2241,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleMessage = async (node: BinaryNode) => {
|
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) {
|
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')
|
logger.trace({ from: node.attrs.from }, 'ignored message')
|
||||||
await sendMessageAck(node)
|
await sendMessageAck(node)
|
||||||
return
|
return
|
||||||
@@ -2256,17 +2250,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const encNode = getBinaryNodeChild(node, 'enc')
|
const encNode = getBinaryNodeChild(node, 'enc')
|
||||||
const unavailableNode = getBinaryNodeChild(node, 'unavailable')
|
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)
|
// msmsg block removed — allow msmsg decryption (required for view-once on linked devices)
|
||||||
if (unavailableNode?.attrs?.type === 'view_once') {
|
if (unavailableNode?.attrs?.type === 'view_once') {
|
||||||
const { fullMessage: voMsg } = decryptMessageNode(
|
const { fullMessage: voMsg } = decryptMessageNode(
|
||||||
|
|||||||
Reference in New Issue
Block a user