Don't include expireTimer with group story reactions

This commit is contained in:
Scott Nonnenberg 2023-05-10 09:14:00 -07:00 committed by GitHub
parent 1622fe21e7
commit 748c56d825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,9 +43,9 @@ export async function enqueueReactionForSend({
'enqueueReactionForSend: No conversation extracted from target message' 'enqueueReactionForSend: No conversation extracted from target message'
); );
const isMessageAStory = isStory(message.attributes);
const targetConversation = const targetConversation =
isStory(message.attributes) && isMessageAStory && isDirectConversation(messageConversation.attributes)
isDirectConversation(messageConversation.attributes)
? window.ConversationController.get(targetAuthorUuid) ? window.ConversationController.get(targetAuthorUuid)
: messageConversation; : messageConversation;
strictAssert( strictAssert(
@ -53,6 +53,10 @@ export async function enqueueReactionForSend({
'enqueueReactionForSend: Did not find a targetConversation' 'enqueueReactionForSend: Did not find a targetConversation'
); );
const expireTimer =
!isMessageAStory || isDirectConversation(targetConversation.attributes)
? targetConversation.get('expireTimer')
: undefined;
const storyMessage = isStory(message.attributes) const storyMessage = isStory(message.attributes)
? message.attributes ? message.attributes
: undefined; : undefined;
@ -67,7 +71,7 @@ export async function enqueueReactionForSend({
received_at: incrementMessageCounter(), received_at: incrementMessageCounter(),
received_at_ms: timestamp, received_at_ms: timestamp,
timestamp, timestamp,
expireTimer: targetConversation.get('expireTimer'), expireTimer,
sendStateByConversationId: zipObject( sendStateByConversationId: zipObject(
targetConversation.getMemberConversationIds(), targetConversation.getMemberConversationIds(),
repeat({ repeat({