Contact Sync: Consider undefined value as a disabled expire timer
This commit is contained in:
parent
a48ea4ab76
commit
8bbd892693
1 changed files with 7 additions and 11 deletions
|
@ -60,17 +60,13 @@ async function updateConversationFromContactSync(
|
||||||
}
|
}
|
||||||
|
|
||||||
// expireTimer isn't in Storage Service so we have to rely on contact sync.
|
// expireTimer isn't in Storage Service so we have to rely on contact sync.
|
||||||
const { expireTimer } = details;
|
await conversation.updateExpirationTimer(details.expireTimer, {
|
||||||
const isValidExpireTimer = typeof expireTimer === 'number';
|
|
||||||
if (isValidExpireTimer) {
|
|
||||||
await conversation.updateExpirationTimer(expireTimer, {
|
|
||||||
source: window.ConversationController.getOurConversationId(),
|
source: window.ConversationController.getOurConversationId(),
|
||||||
receivedAt: receivedAtCounter,
|
receivedAt: receivedAtCounter,
|
||||||
fromSync: true,
|
fromSync: true,
|
||||||
isInitialSync,
|
isInitialSync,
|
||||||
reason: 'contact sync',
|
reason: 'contact sync',
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
window.Whisper.events.trigger('incrementProgress');
|
window.Whisper.events.trigger('incrementProgress');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue