Skip to content

Commit

Permalink
performing search only in policy rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
rlinoz committed Apr 24, 2024
1 parent eebd47c commit 062def2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ function SuggestionMention(
const debouncedSearchInServer = useDebounce(
useCallback(() => {
const foundSuggestionsCount = suggestionValues.suggestedMentions.length;
if (suggestionValues.prefixType === '#' && foundSuggestionsCount < 5) {
if (suggestionValues.prefixType === '#' && foundSuggestionsCount < 5 && isGroupPolicyReport) {
ReportUserActions.searchInServer(value, policyID);
}
}, [suggestionValues.suggestedMentions.length, suggestionValues.prefixType, policyID, value]),
}, [suggestionValues.suggestedMentions.length, suggestionValues.prefixType, policyID, value, isGroupPolicyReport]),
CONST.TIMING.SEARCH_OPTION_LIST_DEBOUNCE_TIME,
);

Expand Down

0 comments on commit 062def2

Please sign in to comment.