From 59d323d815df0ec2b53430731fe315d99a584ebe Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 7 Feb 2022 14:26:20 -0800 Subject: [PATCH] Expiration start timestamp cleanup: Cancel update when missing our UUID --- ts/background.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index d8104630fcba..fae4e15f51c5 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,