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 realm_user based on op.

YashRE42f69de3526767
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.js
index 7cc15a80690..e1a874e7b5f 100644
--- a/frontend_tests/node_tests/dispatch.js
+++ b/frontend_tests/node_tests/dispatch.js
@@ -892,4 +892,6 @@ run_test("server_event_dispatch_op_errors", () => {
server_events_dispatch.dispatch_normal_event({type: "realm_bot", op: "other"});
blueslip.expect("error", "Unexpected event type realm_domains/other");
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"});
});
diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js
index 5ceaabf2865..1528824a6b5 100644
--- a/static/js/server_events_dispatch.js
+++ b/static/js/server_events_dispatch.js
@@ -383,6 +383,9 @@ export function dispatch_normal_event(event) {
case "update":
user_events.update_person(event.person);
break;
+ default:
+ blueslip.error("Unexpected event type realm_user/" + event.op);
+ break;
}
break;