Move expiring message time earlier if read sync has earlier time
This commit is contained in:
parent
a01db40e27
commit
9ed1ee90f8
3 changed files with 38 additions and 20 deletions
|
@ -1289,8 +1289,8 @@
|
|||
}
|
||||
return msFromNow;
|
||||
},
|
||||
async setToExpire() {
|
||||
if (this.isExpiring() && !this.get('expires_at')) {
|
||||
async setToExpire(force = false) {
|
||||
if (this.isExpiring() && (force || !this.get('expires_at'))) {
|
||||
const start = this.get('expirationStartTimestamp');
|
||||
const delta = this.get('expireTimer') * 1000;
|
||||
const expiresAt = start + delta;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue