From b914a1f52ae66c1a8f0e401d0a865464bc5d6bfb Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Mon, 18 Dec 2023 16:31:41 +0200 Subject: [PATCH] Initial commit --- src/Utils/process-message.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 294a63f..9f65d26 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -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 \ No newline at end of file +export default processMessage