Refactor group story reply receipt logic
This commit is contained in:
parent
cfabf8f533
commit
4fa9ce5096
3 changed files with 89 additions and 2 deletions
|
@ -2482,12 +2482,18 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
if (!storyQuoteIsFromSelf) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// The sender is not a recipient for this story
|
||||
if (sendState === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Group replies are always allowed
|
||||
if (!isDirectConversation(conversation.attributes)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// For 1:1 stories, we need to check if they can be replied to
|
||||
return sendState.isAllowedToReplyToStory !== false;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue