From eadeb5e7354eef210c9d0e7075af7d4c5f1737bf Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 16 Feb 2024 15:53:01 +1100 Subject: [PATCH] fix: do not add timer update when for off for groupv1 --- ts/models/conversation.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index e6d84d3f9..5550981ae 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -870,7 +870,6 @@ export class ConversationModel extends Backbone.Model { ); // we don't add an update message when this comes from a config message, as we already have the SyncedMessage itself with the right timestamp to display - const shouldAddExpireUpdateMessage = !fromConfigMessage; if (this.isPublic()) { throw new Error("updateExpireTimer() Disappearing messages aren't supported in communities"); @@ -883,6 +882,13 @@ export class ConversationModel extends Backbone.Model { expirationMode = 'off'; expireTimer = 0; } + const shouldAddExpireUpdateMessage = + (this.isPrivate() && !fromConfigMessage) || + (this.isClosedGroup() && + !PubKey.isClosedGroupV3(this.id) && + !fromConfigMessage && + expirationMode !== this.get('expirationMode') && + expireTimer !== this.get('expireTimer')); // When we add a disappearing messages notification to the conversation, we want it // to be above the message that initiated that change, hence the subtraction.