Skip to content

Commit

Permalink
compose: Enable @-topic for servers that support it
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice authored and chrisbobbe committed Nov 15, 2023
1 parent e55033a commit 6785696
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/autocomplete/PeopleAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import WildcardMentionItem, {
WildcardMentionType,
} from './WildcardMentionItem';
import { TranslationContext } from '../boot/TranslationProvider';
import { getZulipFeatureLevel } from '../account/accountsSelectors';

type Props = $ReadOnly<{|
filter: string,
Expand All @@ -32,6 +33,7 @@ export default function PeopleAutocomplete(props: Props): Node {

const _ = useContext(TranslationContext);

const zulipFeatureLevel = useSelector(getZulipFeatureLevel);
const mutedUsers = useSelector(getMutedUsers);
const ownUserId = useSelector(getOwnUserId);
const users = useSelector(getSortedUsers);
Expand Down Expand Up @@ -70,9 +72,8 @@ export default function PeopleAutocomplete(props: Props): Node {
const wildcardMentionsForQuery = getWildcardMentionsForQuery(
filter,
destinationNarrow,
// TODO condition on feature level, once we know which one:
// https://chat.zulip.org/#narrow/stream/378-api-design/topic/.40topic/near/1669340
false,
// TODO(server-8.0)
zulipFeatureLevel >= 224,
_,
);
const filteredUsers = getAutocompleteSuggestion(users, filter, ownUserId, mutedUsers);
Expand Down

0 comments on commit 6785696

Please sign in to comment.