Maps sent edit message timestamps to their original messages

This commit is contained in:
Josh Perez
2023-05-12 13:09:44 -04:00
committed by GitHub
parent 216ee67c50
commit ac8bec1ac0

View File

@@ -82,8 +82,11 @@ export async function sendEditedMessage(
} }
const timestamp = Date.now(); const timestamp = Date.now();
const targetSentTimestamp =
targetMessage.attributes.editMessageTimestamp ??
targetMessage.attributes.timestamp;
log.info(`${idLog}: sending ${timestamp}`); log.info(`${idLog}: edited(${timestamp}) original(${targetSentTimestamp})`);
conversation.clearTypingTimers(); conversation.clearTypingTimers();
@@ -192,9 +195,7 @@ export async function sendEditedMessage(
conversationId, conversationId,
fromId, fromId,
message: tmpMessage, message: tmpMessage,
targetSentTimestamp: targetSentTimestamp,
targetMessage.attributes.editMessageTimestamp ??
targetMessage.attributes.timestamp,
}; };
// Takes care of putting the message in the edit history, replacing the // Takes care of putting the message in the edit history, replacing the