From 7d5b660bc14ca6c99f852eb7b2ac1a5ffd66ea0c Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 1 Nov 2023 10:38:21 +1100 Subject: [PATCH] fix: start timer on message even if message already exists --- ts/models/conversation.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index 39e26e055..534428aa3 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -901,11 +901,6 @@ export class ConversationModel extends Backbone.Model { expirationMode ); - // For some reasons, we want a timer update to "off" to disappear with the previous setting on that conversation... - const shouldUsePreviousExpiration = - expirationType === 'unknown' && - previousExpirationMode !== 'off' && - previousExpirationMode !== 'legacy'; const commonAttributes = { flags: SignalService.DataMessage.Flags.EXPIRATION_TIMER_UPDATE, expirationTimerUpdate: { @@ -937,8 +932,8 @@ export class ConversationModel extends Backbone.Model { } } else { message.set({ - expirationType: shouldUsePreviousExpiration ? previousExpirationMode : expirationType, - expireTimer: shouldUsePreviousExpiration ? previousExpirationTimer : expireTimer, + expirationType: expireTimer === 0 ? oldExpirationType : expirationType, + expireTimer: expireTimer === 0 ? oldExpireTimer : expireTimer, }); }