Page MenuHomePhabricator

D10494.diff
No OneTemporary

D10494.diff

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<RelativeMemberInfo>,
- viewerID: ?string,
typeaheadMatchedStrings: ?TypeaheadMatchedStrings,
): $ReadOnlyArray<MentionTypeaheadUserSuggestionItem> {
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,
);

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 12:45 PM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611716
Default Alt Text
D10494.diff (2 KB)

Event Timeline