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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,8 +82,11 @@ export async function sendEditedMessage(
}
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();
@ -192,9 +195,7 @@ export async function sendEditedMessage(
conversationId,
fromId,
message: tmpMessage,
targetSentTimestamp:
targetMessage.attributes.editMessageTimestamp ??
targetMessage.attributes.timestamp,
targetSentTimestamp,
};
// Takes care of putting the message in the edit history, replacing the