From 748c56d825ee9272351f3ea4e383ba52777bf117 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 10 May 2023 09:14:00 -0700 Subject: [PATCH] Don't include expireTimer with group story reactions --- ts/reactions/enqueueReactionForSend.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ts/reactions/enqueueReactionForSend.ts b/ts/reactions/enqueueReactionForSend.ts index 87bd4ac35928..12bea35bcfb6 100644 --- a/ts/reactions/enqueueReactionForSend.ts +++ b/ts/reactions/enqueueReactionForSend.ts @@ -43,9 +43,9 @@ export async function enqueueReactionForSend({ 'enqueueReactionForSend: No conversation extracted from target message' ); + const isMessageAStory = isStory(message.attributes); const targetConversation = - isStory(message.attributes) && - isDirectConversation(messageConversation.attributes) + isMessageAStory && isDirectConversation(messageConversation.attributes) ? window.ConversationController.get(targetAuthorUuid) : messageConversation; strictAssert( @@ -53,6 +53,10 @@ export async function enqueueReactionForSend({ 'enqueueReactionForSend: Did not find a targetConversation' ); + const expireTimer = + !isMessageAStory || isDirectConversation(targetConversation.attributes) + ? targetConversation.get('expireTimer') + : undefined; const storyMessage = isStory(message.attributes) ? message.attributes : undefined; @@ -67,7 +71,7 @@ export async function enqueueReactionForSend({ received_at: incrementMessageCounter(), received_at_ms: timestamp, timestamp, - expireTimer: targetConversation.get('expireTimer'), + expireTimer, sendStateByConversationId: zipObject( targetConversation.getMemberConversationIds(), repeat({