mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
user-groups: Make members list search work correctly for subgroups.
There were two bugs that this commit fixed - 1) For system groups, the query was being matched with the actual group name instead of display name. 2) Subgroup name was not converted to lower case before matching it with query which is converted to lower case.
This commit is contained in:
@@ -3,6 +3,7 @@ import $ from "jquery";
|
||||
import {$t_html} from "./i18n.ts";
|
||||
import * as people from "./people.ts";
|
||||
import type {User} from "./people.ts";
|
||||
import * as user_groups from "./user_groups.ts";
|
||||
import type {UserGroup} from "./user_groups.ts";
|
||||
import * as user_sort from "./user_sort.ts";
|
||||
import * as util from "./util.ts";
|
||||
@@ -116,7 +117,7 @@ export function build_group_member_matcher(query: string): (member: User | UserG
|
||||
return termlet_matchers.every((matcher) => matcher(member));
|
||||
}
|
||||
|
||||
const group_name = member.name;
|
||||
const group_name = user_groups.get_display_group_name(member.name).toLowerCase();
|
||||
if (group_name.startsWith(query)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user