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:
Sahil Batra
2025-01-22 07:55:31 +05:30
committed by Tim Abbott
parent 62ab21bd79
commit 255eee255b
6 changed files with 25 additions and 19 deletions

View File

@@ -992,10 +992,13 @@ export function dispatch_normal_event(event) {
event.direct_subgroup_ids,
);
break;
case "update":
user_groups.update(event);
user_group_edit.update_group(event);
case "update": {
const group_id = event.group_id;
const group = user_groups.get_user_group_from_id(group_id);
user_groups.update(event, group);
user_group_edit.update_group(event, group);
break;
}
default:
blueslip.error("Unexpected event type user_group/" + event.op);
break;