Use envelope.receivedAtDate when saving items to the cache

This commit is contained in:
Scott Nonnenberg 2023-02-06 09:35:14 -08:00 committed by GitHub
parent 2db0a40e7b
commit f3b68677b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,
};