diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -1060,6 +1060,7 @@ function threadFrozenDueToViewerBlock( threadInfo: RawThreadInfo | ThreadInfo, + communityThreadInfo: ?(RawThreadInfo | ThreadInfo), viewerID: ?string, userInfos: UserInfos, ): boolean { diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js --- a/native/chat/chat-input-bar.react.js +++ b/native/chat/chat-input-bar.react.js @@ -300,6 +300,7 @@ +chatMentionSearchIndex: ?SentencePrefixSearchIndex, +chatMentionCandidates: ChatMentionCandidates, +parentThreadInfo: ?ThreadInfo, + +communityThreadInfo: ?ThreadInfo, +editedMessagePreview: ?MessagePreviewResult, +editedMessageInfo: ?MessageInfo, +editMessage: ( @@ -701,6 +702,7 @@ } else if ( threadFrozenDueToViewerBlock( this.props.threadInfo, + this.props.communityThreadInfo, this.props.viewerID, this.props.userInfos, ) && @@ -1259,10 +1261,13 @@ const { getChatMentionSearchIndex } = useChatMentionContext(); const chatMentionSearchIndex = getChatMentionSearchIndex(props.threadInfo); - const { parentThreadID } = props.threadInfo; + const { parentThreadID, community } = props.threadInfo; const parentThreadInfo = useSelector(state => parentThreadID ? threadInfoSelector(state)[parentThreadID] : null, ); + const communityThreadInfo = useSelector(state => + community ? threadInfoSelector(state)[community] : null, + ); const userMentionsCandidates = useUserMentionsCandidates( props.threadInfo, @@ -1349,6 +1354,7 @@ chatMentionSearchIndex={chatMentionSearchIndex} chatMentionCandidates={chatMentionCandidates} parentThreadInfo={parentThreadInfo} + communityThreadInfo={communityThreadInfo} editedMessagePreview={editedMessagePreview} editedMessageInfo={editedMessageInfo} editMessage={editMessage} diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js --- a/web/chat/chat-input-bar.react.js +++ b/web/chat/chat-input-bar.react.js @@ -83,6 +83,7 @@ +typeaheadMatchedStrings: ?TypeaheadMatchedStrings, +suggestions: $ReadOnlyArray, +parentThreadInfo: ?ThreadInfo, + +communityThreadInfo: ?ThreadInfo, }; class ChatInputBar extends React.PureComponent { @@ -343,6 +344,7 @@ } else if ( threadFrozenDueToViewerBlock( this.props.threadInfo, + this.props.communityThreadInfo, this.props.viewerID, this.props.userInfos, ) && @@ -588,11 +590,15 @@ const { getChatMentionSearchIndex } = useChatMentionContext(); const chatMentionSearchIndex = getChatMentionSearchIndex(props.threadInfo); - const { parentThreadID } = props.threadInfo; + const { parentThreadID, community } = props.threadInfo; const parentThreadInfo = useSelector(state => parentThreadID ? threadInfoSelector(state)[parentThreadID] : null, ); + const communityThreadInfo = useSelector(state => + community ? threadInfoSelector(state)[community] : null, + ); + const userMentionsCandidates = useUserMentionsCandidates( props.threadInfo, parentThreadInfo, @@ -673,6 +679,7 @@ typeaheadMatchedStrings={typeaheadMatchedStrings} suggestions={suggestions} parentThreadInfo={parentThreadInfo} + communityThreadInfo={communityThreadInfo} /> ); });