Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
server_events_dispatch: Throw from "reaction" based on event.op.
YashRE42e3b6cc61f318
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.jsindex 587e6de9aeb..d64c68a0b96 100644--- a/frontend_tests/node_tests/dispatch.js+++ b/frontend_tests/node_tests/dispatch.js@@ -880,4 +880,6 @@ run_test("realm_export", (override) => {run_test("server_event_dispatch_op_errors", () => {blueslip.expect("error", "Unexpected event type subscription/other");server_events_dispatch.dispatch_normal_event({type: "subscription", op: "other"});+ blueslip.expect("error", "Unexpected event type reaction/other");+ server_events_dispatch.dispatch_normal_event({type: "reaction", op: "other"});});diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.jsindex 86befe6a859..7c8d2d713b1 100644--- a/static/js/server_events_dispatch.js+++ b/static/js/server_events_dispatch.js@@ -157,6 +157,9 @@ export function dispatch_normal_event(event) {case "remove":reactions.remove_reaction(event);break;+ default:+ blueslip.error("Unexpected event type reaction/" + event.op);+ break;}break;