mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update messages-recv.ts
This commit is contained in:
@@ -156,9 +156,9 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
{
|
{
|
||||||
tag: 'retry',
|
tag: 'retry',
|
||||||
attrs: {
|
attrs: {
|
||||||
count: retryCount.toString(),
|
count: retryCount,
|
||||||
id: node.attrs.id,
|
id: node.attrs.id.toString(),
|
||||||
t: node.attrs.t,
|
t: node.attrs.t.toString(),
|
||||||
v: '1'
|
v: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -678,6 +678,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleMessage = async(node: BinaryNode) => {
|
const handleMessage = async(node: BinaryNode) => {
|
||||||
|
if(getBinaryNodeChild(node, 'unavailable') && !getBinaryNodeChild(node, 'enc')) {
|
||||||
|
// "missing message from node" fix
|
||||||
|
logger.debug(node, 'missing body; sending ack then ignoring.')
|
||||||
|
await sendMessageAck(node)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const { fullMessage: msg, category, author, decrypt } = decryptMessageNode(
|
const { fullMessage: msg, category, author, decrypt } = decryptMessageNode(
|
||||||
node,
|
node,
|
||||||
authState.creds.me!.id,
|
authState.creds.me!.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user