Fix forwarded messages timestamp offset
This commit is contained in:
parent
2710f463a7
commit
4e6c3ba9df
1 changed files with 7 additions and 2 deletions
|
@ -142,6 +142,8 @@ export async function maybeForwardMessages(
|
||||||
loadStickerData,
|
loadStickerData,
|
||||||
} = window.Signal.Migrations;
|
} = window.Signal.Migrations;
|
||||||
|
|
||||||
|
let timestampOffset = 0;
|
||||||
|
|
||||||
// load any sticker data, attachments, or link previews that we need to
|
// load any sticker data, attachments, or link previews that we need to
|
||||||
// send along with the message and do the send to each conversation.
|
// send along with the message and do the send to each conversation.
|
||||||
const preparedMessages = await Promise.all(
|
const preparedMessages = await Promise.all(
|
||||||
|
@ -228,12 +230,15 @@ export async function maybeForwardMessages(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Actually send the messages
|
// Actually send the messages
|
||||||
conversations.forEach((conversation, offset) => {
|
conversations.forEach(conversation => {
|
||||||
if (conversation == null) {
|
if (conversation == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const timestamp = baseTimestamp + offset;
|
|
||||||
sortedMessages.forEach(entry => {
|
sortedMessages.forEach(entry => {
|
||||||
|
const timestamp = baseTimestamp + timestampOffset;
|
||||||
|
timestampOffset += 1;
|
||||||
|
|
||||||
const { enqueuedMessage, originalMessage } = entry;
|
const { enqueuedMessage, originalMessage } = entry;
|
||||||
drop(
|
drop(
|
||||||
conversation
|
conversation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue