From c9fa9cacf5f967021ed2128d54df6f39fa7812b3 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Wed, 9 Feb 2022 09:24:36 -0800 Subject: [PATCH] Expiration start timestamp cleanup: Cancel update when missing our UUID Co-authored-by: Scott Nonnenberg --- ts/background.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index fdcc5607c..1d6879897 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -1696,7 +1696,11 @@ export async function startApp(): Promise { log.info( `Expiration start timestamp cleanup: Found ${messagesUnexpectedlyMissingExpirationStartTimestamp.length} messages for cleanup` ); - if (messagesUnexpectedlyMissingExpirationStartTimestamp.length) { + if (!window.textsecure.storage.user.getUuid()) { + log.info( + "Expiration start timestamp cleanup: Cancelling update; we don't have our own UUID" + ); + } else if (messagesUnexpectedlyMissingExpirationStartTimestamp.length) { const newMessageAttributes = messagesUnexpectedlyMissingExpirationStartTimestamp.map(message => { const expirationStartTimestamp = Math.min( @@ -1714,7 +1718,7 @@ export async function startApp(): Promise { ) ); log.info( - `Expiration start timestamp cleanup: starting timer for ${message.type} message sent at ${message.sent_at}. Starting timer at ${message.expirationStartTimestamp}` + `Expiration start timestamp cleanup: starting timer for ${message.type} message sent at ${message.sent_at}. Starting timer at ${expirationStartTimestamp}` ); return { ...message,