Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

server_events_dispatch: Throw blueslip from stream based on event.op.

YashRE42a93adbfa76d2
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.js
index e1a874e7b5f..74fdfa9951b 100644
--- a/frontend_tests/node_tests/dispatch.js
+++ b/frontend_tests/node_tests/dispatch.js
@@ -894,4 +894,6 @@ run_test("server_event_dispatch_op_errors", () => {
server_events_dispatch.dispatch_normal_event({type: "realm_domains", op: "other"});
blueslip.expect("error", "Unexpected event type realm_user/other");
server_events_dispatch.dispatch_normal_event({type: "realm_user", op: "other"});
+ blueslip.expect("error", "Unexpected event type stream/other");
+ server_events_dispatch.dispatch_normal_event({type: "stream", op: "other"});
});
diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js
index 1528824a6b5..71c1bf40ca2 100644
--- a/static/js/server_events_dispatch.js
+++ b/static/js/server_events_dispatch.js
@@ -437,6 +437,9 @@ export function dispatch_normal_event(event) {
}
}
break;
+ default:
+ blueslip.error("Unexpected event type stream/" + event.op);
+ break;
}
break;