Skip to content

Commit

Permalink
Contact Sync: Consider undefined value as a disabled expire timer
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Nonnenberg <scott@signal.org>
  • Loading branch information
automated-signal and scottnonnenberg-signal committed Sep 1, 2022
1 parent fd45d9b commit cf3060e
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions ts/services/contactSync.ts
Expand Up @@ -60,17 +60,13 @@ async function updateConversationFromContactSync(
}

// expireTimer isn't in Storage Service so we have to rely on contact sync.
const { expireTimer } = details;
const isValidExpireTimer = typeof expireTimer === 'number';
if (isValidExpireTimer) {
await conversation.updateExpirationTimer(expireTimer, {
source: window.ConversationController.getOurConversationId(),
receivedAt: receivedAtCounter,
fromSync: true,
isInitialSync,
reason: 'contact sync',
});
}
await conversation.updateExpirationTimer(details.expireTimer, {
source: window.ConversationController.getOurConversationId(),
receivedAt: receivedAtCounter,
fromSync: true,
isInitialSync,
reason: 'contact sync',
});

window.Whisper.events.trigger('incrementProgress');
}
Expand Down

0 comments on commit cf3060e

Please sign in to comment.