mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
user_group: Show subgroups in popover.
Previously, all members of the group, including members of recursive groups, were shown in the the popover. Now only direct members are shown along with the direct subgroups of the group. Fixes #32088.
This commit is contained in:
@@ -335,6 +335,17 @@ export function get_potential_subgroups(target_user_group_id: number): UserGroup
|
||||
});
|
||||
}
|
||||
|
||||
export function get_direct_subgroups_of_group(target_user_group: UserGroup): UserGroup[] {
|
||||
const direct_subgroups = [];
|
||||
const subgroup_ids = target_user_group.direct_subgroup_ids;
|
||||
for (const subgroup_id of subgroup_ids) {
|
||||
const subgroup = user_group_by_id_dict.get(subgroup_id);
|
||||
assert(subgroup !== undefined);
|
||||
direct_subgroups.push(subgroup);
|
||||
}
|
||||
return direct_subgroups;
|
||||
}
|
||||
|
||||
export function is_user_in_group(
|
||||
user_group_id: number,
|
||||
user_id: number,
|
||||
|
||||
Reference in New Issue
Block a user