Story replies: Require referenced story only for groups

This commit is contained in:
Scott Nonnenberg 2024-05-24 09:54:44 +10:00 committed by GitHub
parent 29eb07c159
commit d87684a03c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1963,26 +1963,15 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return sendState.isAllowedToReplyToStory !== false; return sendState.isAllowedToReplyToStory !== false;
}); });
if (storyContext && !storyQuote) { if (
if (!isDirectConversation(conversation.attributes)) { storyContext &&
log.warn( !storyQuote &&
`${idLog}: Received ${storyContextLogId} message in group but no matching story. Dropping.` !isDirectConversation(conversation.attributes)
); ) {
confirm();
return;
}
if (storyQuotes.length === 0) {
log.warn(
`${idLog}: Received ${storyContextLogId} message but no matching story. We'll try processing this message again later.`
);
return;
}
log.warn( log.warn(
`${idLog}: Received ${storyContextLogId} message in 1:1 conversation but no matching story. Dropping.` `${idLog}: Received ${storyContextLogId} message in group but no matching story. Dropping.`
); );
confirm(); confirm();
return; return;
} }