Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compose: Enable @-topic for servers that support it #5792

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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