mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
server_events_dispatch: Throw blueslip from stream based on event.op.
This commit is contained in:
@@ -894,4 +894,6 @@ run_test("server_event_dispatch_op_errors", () => {
|
|||||||
server_events_dispatch.dispatch_normal_event({type: "realm_domains", op: "other"});
|
server_events_dispatch.dispatch_normal_event({type: "realm_domains", op: "other"});
|
||||||
blueslip.expect("error", "Unexpected event type realm_user/other");
|
blueslip.expect("error", "Unexpected event type realm_user/other");
|
||||||
server_events_dispatch.dispatch_normal_event({type: "realm_user", op: "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"});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -437,6 +437,9 @@ export function dispatch_normal_event(event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
blueslip.error("Unexpected event type stream/" + event.op);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user