user_groups: Add UI to set and update can_mention_group setting.

This commit adds support to set can_mention_group setting
when creating user group and also update the setting for
existing user groups.
This commit is contained in:
Sahil Batra
2023-11-27 16:06:07 +05:30
committed by Tim Abbott
parent db0476622a
commit 2968eb2b04
13 changed files with 192 additions and 11 deletions

View File

@@ -78,6 +78,12 @@ export function update(event: UserGroupUpdateEvent): void {
user_group_name_dict.delete(group.name);
user_group_name_dict.set(group.name, group);
}
if (event.data.can_mention_group !== undefined) {
group.can_mention_group = event.data.can_mention_group;
user_group_name_dict.delete(group.name);
user_group_name_dict.set(group.name, group);
}
}
export function get_user_group_from_name(name: string): UserGroup | undefined {