From f3b68677b36752388174130460ad7ddac3e753bb Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 6 Feb 2023 09:35:14 -0800 Subject: [PATCH] Use envelope.receivedAtDate when saving items to the cache --- ts/textsecure/MessageReceiver.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index 3ad1da2bcef1..e89613309e2e 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -1113,11 +1113,14 @@ export default class MessageReceiver id, version: 2, + // This field is only used for aging items out of the cache. The original + // envelope's timestamp will be used when retrying this item. + timestamp: envelope.receivedAtDate, + attempts: 0, envelope: Bytes.toBase64(plaintext), messageAgeSec: envelope.messageAgeSec, receivedAtCounter: envelope.receivedAtCounter, - timestamp: envelope.timestamp, urgent: envelope.urgent, story: envelope.story, };