diff --git a/lib/shared/mention-utils.js b/lib/shared/mention-utils.js --- a/lib/shared/mention-utils.js +++ b/lib/shared/mention-utils.js @@ -4,7 +4,6 @@ import { markdownUserMentionRegexString } from './account-utils.js'; import SentencePrefixSearchIndex from './sentence-prefix-search-index.js'; -import { threadOtherMembers } from './thread-utils.js'; import { stringForUserExplicit } from './user-utils.js'; import { useENSNames } from '../hooks/ens-cache.js'; import { useUserSearchIndex } from '../selectors/nav-selectors.js'; @@ -107,7 +106,6 @@ const useENSNamesOptions = { allAtOnce: true }; function useMentionTypeaheadUserSuggestions( threadMembers: $ReadOnlyArray, - viewerID: ?string, typeaheadMatchedStrings: ?TypeaheadMatchedStrings, ): $ReadOnlyArray { const userSearchIndex = useUserSearchIndex(threadMembers); @@ -121,7 +119,7 @@ } const userIDs = userSearchIndex.getSearchResults(usernamePrefix); - const usersInThread = threadOtherMembers(resolvedThreadMembers, viewerID); + const usersInThread = resolvedThreadMembers.filter(member => member.role); return usersInThread .filter(user => usernamePrefix.length === 0 || userIDs.includes(user.id)) @@ -131,7 +129,7 @@ ), ) .map(userInfo => ({ type: 'user', userInfo })); - }, [userSearchIndex, resolvedThreadMembers, usernamePrefix, viewerID]); + }, [userSearchIndex, resolvedThreadMembers, usernamePrefix]); } function useMentionTypeaheadChatSuggestions( 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 @@ -1312,7 +1312,6 @@ const suggestedUsers = useMentionTypeaheadUserSuggestions( userMentionsCandidates, - viewerID, typeaheadMatchedStrings, ); 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 @@ -643,7 +643,6 @@ const suggestedUsers = useMentionTypeaheadUserSuggestions( props.inputState.typeaheadState.frozenUserMentionsCandidates, - viewerID, typeaheadMatchedStrings, );