Expiration start timestamp cleanup: Cancel update when missing our UUID

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
automated-signal 2022-02-09 09:24:36 -08:00 committed by GitHub
parent d4de93e420
commit c9fa9cacf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -1696,7 +1696,11 @@ export async function startApp(): Promise<void> {
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<void> {
)
);
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,