mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix(missing messages): revert to normal (#732)
* revert to normal * International community, please do not condemn me for this * Update decode-wa-message.ts * Update src/Utils/decode-wa-message.ts
This commit is contained in:
@@ -683,13 +683,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
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(
|
||||
node,
|
||||
authState.creds.me!.id,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Logger } from 'pino'
|
||||
import { proto } from '../../WAProto'
|
||||
import { SignalRepository, WAMessageKey } from '../Types'
|
||||
import { areJidsSameUser, BinaryNode, isJidBroadcast, isJidGroup, isJidStatusBroadcast, isJidUser, isLidUser } from '../WABinary'
|
||||
import { unpadRandomMax16 } from './generics'
|
||||
import { BufferJSON, unpadRandomMax16 } from './generics'
|
||||
|
||||
const NO_MESSAGE_FOUND_ERROR_TEXT = 'Message absent from node'
|
||||
|
||||
@@ -195,7 +195,7 @@ export const decryptMessageNode = (
|
||||
// if nothing was found to decrypt
|
||||
if(!decryptables) {
|
||||
fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT
|
||||
fullMessage.messageStubParameters = [NO_MESSAGE_FOUND_ERROR_TEXT]
|
||||
fullMessage.messageStubParameters = [NO_MESSAGE_FOUND_ERROR_TEXT, JSON.stringify(stanza, BufferJSON.replacer)]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user