format: oxfmt ws connect role check
This commit is contained in:
parent
dfcd7b6542
commit
52d30a43e4
@ -334,9 +334,7 @@ export function attachGatewayWsMessageHandler(params: {
|
||||
|
||||
const roleRaw = connectParams.role ?? "operator";
|
||||
const role =
|
||||
roleRaw === "operator" || roleRaw === "node" || roleRaw === "webchat"
|
||||
? roleRaw
|
||||
: null;
|
||||
roleRaw === "operator" || roleRaw === "node" || roleRaw === "webchat" ? roleRaw : null;
|
||||
if (!role) {
|
||||
setHandshakeState("failed");
|
||||
setCloseCause("invalid-role", {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user