mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
server_events_dispatch: Throw blueslip if wrong op in realm_bot case.
This commit is contained in:
@@ -888,4 +888,6 @@ run_test("server_event_dispatch_op_errors", () => {
|
|||||||
op: "update_dict",
|
op: "update_dict",
|
||||||
property: "other",
|
property: "other",
|
||||||
});
|
});
|
||||||
|
blueslip.expect("error", "Unexpected event type realm_bot/other");
|
||||||
|
server_events_dispatch.dispatch_normal_event({type: "realm_bot", op: "other"});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -316,6 +316,9 @@ export function dispatch_normal_event(event) {
|
|||||||
settings_bots.eventually_render_bots();
|
settings_bots.eventually_render_bots();
|
||||||
settings_users.update_bot_data(event.bot.user_id);
|
settings_users.update_bot_data(event.bot.user_id);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
blueslip.error("Unexpected event type realm_bot/" + event.op);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "realm_emoji":
|
case "realm_emoji":
|
||||||
|
|||||||
Reference in New Issue
Block a user