Expiration start timestamp cleanup: Cancel update when missing our UUID
This commit is contained in:
parent
45393b1ca5
commit
59d323d815
1 changed files with 6 additions and 2 deletions
|
@ -1696,7 +1696,11 @@ export async function startApp(): Promise<void> {
|
||||||
log.info(
|
log.info(
|
||||||
`Expiration start timestamp cleanup: Found ${messagesUnexpectedlyMissingExpirationStartTimestamp.length} messages for cleanup`
|
`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 =
|
const newMessageAttributes =
|
||||||
messagesUnexpectedlyMissingExpirationStartTimestamp.map(message => {
|
messagesUnexpectedlyMissingExpirationStartTimestamp.map(message => {
|
||||||
const expirationStartTimestamp = Math.min(
|
const expirationStartTimestamp = Math.min(
|
||||||
|
@ -1714,7 +1718,7 @@ export async function startApp(): Promise<void> {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
log.info(
|
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 {
|
return {
|
||||||
...message,
|
...message,
|
||||||
|
|
Loading…
Reference in a new issue