From d7eafb7e152e107a52ae2713af2a9eedbaf5dba6 Mon Sep 17 00:00:00 2001 From: Brice-W Date: Mon, 26 Jul 2021 10:49:35 +1000 Subject: [PATCH] rollback changes --- ts/models/message.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/models/message.ts b/ts/models/message.ts index 493a62bae..893cd42cb 100644 --- a/ts/models/message.ts +++ b/ts/models/message.ts @@ -1094,7 +1094,7 @@ export class MessageModel extends Backbone.Model { return msFromNow; } - public async setToExpire(commit = true, force = false) { + public async setToExpire(force = false) { if (this.isExpiring() && (force || !this.get('expires_at'))) { const start = this.get('expirationStartTimestamp'); const delta = this.get('expireTimer') * 1000; @@ -1105,7 +1105,7 @@ export class MessageModel extends Backbone.Model { this.set({ expires_at: expiresAt }); const id = this.get('id'); - if (id && commit) { + if (id) { await this.commit(); }