Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383049
D11308.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D11308.diff
View Options
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<MentionTypeaheadSuggestionItem>,
+parentThreadInfo: ?ThreadInfo,
+ +communityThreadInfo: ?ThreadInfo,
};
class ChatInputBar extends React.PureComponent<Props> {
@@ -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}
/>
);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 1:13 PM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597104
Default Alt Text
D11308.diff (3 KB)
Attached To
Mode
D11308: [native][web] Update `ChatInputBar` to pass `communityThreadInfo` to `threadFrozenDueToViewerBlock`
Attached
Detach File
Event Timeline
Log In to Comment