mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
events: Pass group in functions called for updating the group.
We now pass group in functions called while handling group update events, instead of fetching the groups in those function as we will need the old setting value in future commits.
This commit is contained in:
@@ -88,8 +88,7 @@ export function maybe_get_user_group_from_id(group_id: number): UserGroup | unde
|
||||
return user_group_by_id_dict.get(group_id);
|
||||
}
|
||||
|
||||
export function update(event: UserGroupUpdateEvent): void {
|
||||
const group = get_user_group_from_id(event.group_id);
|
||||
export function update(event: UserGroupUpdateEvent, group: UserGroup): void {
|
||||
if (event.data.name !== undefined) {
|
||||
user_group_name_dict.delete(group.name);
|
||||
group.name = event.data.name;
|
||||
|
||||
Reference in New Issue
Block a user