fix: timestamp & other details not appearing + remove participant property from root message

This commit is contained in:
Adhiraj Singh
2021-11-22 16:01:58 +05:30
parent d5e3d049c4
commit d2e3abfe49

View File

@@ -375,6 +375,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
id: dec.msgId, id: dec.msgId,
participant: dec.participant participant: dec.participant
} }
const partialMsg: Partial<proto.IWebMessageInfo> = {
messageTimestamp: dec.timestamp,
pushName: dec.pushname
}
// if there were some successful decryptions // if there were some successful decryptions
if(dec.successes.length) { if(dec.successes.length) {
// send message receipt // send message receipt
@@ -418,9 +422,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
key, key,
message, message,
status: isMe ? proto.WebMessageInfo.WebMessageInfoStatus.SERVER_ACK : null, status: isMe ? proto.WebMessageInfo.WebMessageInfoStatus.SERVER_ACK : null,
messageTimestamp: dec.timestamp, ...partialMsg
pushName: dec.pushname,
participant: dec.participant
}) })
} }
@@ -434,7 +436,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
fullMessages.push({ fullMessages.push({
key, key,
messageStubType: WAMessageStubType.CIPHERTEXT, messageStubType: WAMessageStubType.CIPHERTEXT,
messageStubParameters: [error.message] messageStubParameters: [error.message],
...partialMsg
}) })
} }