rollback changes

pull/1786/head
Brice-W 4 years ago
parent 72868c10e5
commit d7eafb7e15

@ -1094,7 +1094,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
return msFromNow; return msFromNow;
} }
public async setToExpire(commit = true, force = false) { public async setToExpire(force = false) {
if (this.isExpiring() && (force || !this.get('expires_at'))) { if (this.isExpiring() && (force || !this.get('expires_at'))) {
const start = this.get('expirationStartTimestamp'); const start = this.get('expirationStartTimestamp');
const delta = this.get('expireTimer') * 1000; const delta = this.get('expireTimer') * 1000;
@ -1105,7 +1105,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
this.set({ expires_at: expiresAt }); this.set({ expires_at: expiresAt });
const id = this.get('id'); const id = this.get('id');
if (id && commit) { if (id) {
await this.commit(); await this.commit();
} }

Loading…
Cancel
Save