mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Merge pull request #554 from WhiskeySockets/fix-message-retry
Fix message retry for incoming "ciphertext" messages
This commit is contained in:
@@ -263,6 +263,22 @@ const processMessage = async(
|
||||
ephemeralSettingTimestamp: toNumber(message.messageTimestamp),
|
||||
ephemeralExpiration: protocolMsg.ephemeralExpiration || null
|
||||
})
|
||||
break
|
||||
case proto.Message.ProtocolMessage.Type.PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE:
|
||||
const response = protocolMsg.peerDataOperationRequestResponseMessage!
|
||||
if(response) {
|
||||
const { peerDataOperationResult } = response
|
||||
for(const result of peerDataOperationResult!) {
|
||||
const { placeholderMessageResendResponse: retryResponse } = result
|
||||
if(retryResponse) {
|
||||
const webMessageInfo = proto.WebMessageInfo.decode(retryResponse.webMessageInfoBytes!)
|
||||
ev.emit('messages.update', [
|
||||
{ key: webMessageInfo.key, update: { message: webMessageInfo.message } }
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
} else if(content?.reactionMessage) {
|
||||
@@ -387,4 +403,4 @@ const processMessage = async(
|
||||
}
|
||||
}
|
||||
|
||||
export default processMessage
|
||||
export default processMessage
|
||||
|
||||
Reference in New Issue
Block a user