From a053c395a46f3c447622c6b989a1b2da33074508 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Thu, 24 Jun 2021 10:38:52 -0700 Subject: [PATCH] Forwarded messages must use different timestamps --- ts/views/conversation_view.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ts/views/conversation_view.ts b/ts/views/conversation_view.ts index a5869b9140..c3af1df0b3 100644 --- a/ts/views/conversation_view.ts +++ b/ts/views/conversation_view.ts @@ -2430,15 +2430,14 @@ Whisper.ConversationView = Whisper.View.extend({ } const sendMessageOptions = { dontClearDraft: true }; - let timestamp = Date.now(); + const baseTimestamp = Date.now(); // Actually send the message // load any sticker data, attachments, or link previews that we need to // send along with the message and do the send to each conversation. await Promise.all( - conversations.map(async conversation => { - timestamp += 1; - + conversations.map(async (conversation, offset) => { + const timestamp = baseTimestamp + offset; if (conversation) { const sticker = message.get('sticker'); if (sticker) {