diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 1f6f909c..53723194 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -2232,6 +2232,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { msg.messageTimestamp = +node.attrs.t! const fullMsg = proto.WebMessageInfo.fromObject(msg) as WAMessage + // Preserve custom WAMessageKey fields (participantAlt, participantUsername, + // addressingMode) that proto.WebMessageInfo.fromObject strips because + // they aren't part of the proto.MessageKey schema. + fullMsg.key = msg.key await upsertMessage(fullMsg, 'append') } })