server_events_dispatch: Throw blueslip from realm_user based on op.

This commit is contained in:
YashRE42
2020-10-16 01:55:11 +00:00
committed by Tim Abbott
parent 27ac45e71b
commit f69de35267
2 changed files with 5 additions and 0 deletions

View File

@@ -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"});
});

View File

@@ -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;