Deprecate check for versioned expire timer capability
This commit is contained in:
parent
1dea35043d
commit
a2bbfd9496
5 changed files with 3 additions and 106 deletions
|
@ -5383,7 +5383,7 @@ export class ConversationModel extends window.Backbone
|
|||
if (!isDirectConversation(this.attributes)) {
|
||||
return;
|
||||
}
|
||||
const { expireTimerVersion, capabilities } = this.attributes;
|
||||
const { expireTimerVersion } = this.attributes;
|
||||
|
||||
// This should not happen in practice, but be ready to handle
|
||||
if (expireTimerVersion >= MAX_EXPIRE_TIMER_VERSION) {
|
||||
|
@ -5391,22 +5391,6 @@ export class ConversationModel extends window.Backbone
|
|||
return;
|
||||
}
|
||||
|
||||
if (expireTimerVersion <= 2) {
|
||||
if (!capabilities?.versionedExpirationTimer) {
|
||||
log.warn(`${logId}: missing recipient capability`);
|
||||
return;
|
||||
}
|
||||
const me = window.ConversationController.getOurConversationOrThrow();
|
||||
if (!me.get('capabilities')?.versionedExpirationTimer) {
|
||||
log.warn(`${logId}: missing sender capability`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Increment only if sender and receiver are both capable
|
||||
} else {
|
||||
// If we or them updated the timer version past 2 - we are both capable
|
||||
}
|
||||
|
||||
const newVersion = expireTimerVersion + 1;
|
||||
this.set('expireTimerVersion', newVersion);
|
||||
await DataWriter.updateConversation(this.attributes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue