Merge pull request #554 from WhiskeySockets/fix-message-retry

Fix message retry for incoming "ciphertext" messages
This commit is contained in:
ShellTear
2023-12-27 03:15:29 +02:00
committed by GitHub

View File

@@ -263,6 +263,22 @@ const processMessage = async(
ephemeralSettingTimestamp: toNumber(message.messageTimestamp), ephemeralSettingTimestamp: toNumber(message.messageTimestamp),
ephemeralExpiration: protocolMsg.ephemeralExpiration || null 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 break
} }
} else if(content?.reactionMessage) { } else if(content?.reactionMessage) {