From 800d778183f9ecaa8bbf36f0c4bb8f4bae217197 Mon Sep 17 00:00:00 2001 From: hippoz Date: Wed, 15 Sep 2021 15:56:24 +0300 Subject: [PATCH] fix(gateway): remove unintended code --- brainlet/api/v2/gateway/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainlet/api/v2/gateway/index.js b/brainlet/api/v2/gateway/index.js index d5d7002..9500c1a 100644 --- a/brainlet/api/v2/gateway/index.js +++ b/brainlet/api/v2/gateway/index.js @@ -150,7 +150,7 @@ class GatewayHandler { // Gateway message handlers async handle_YOO({ data }, session) { - if (session.authenticated || !Array.isArray(data.roles) || data.roles.length > 10 || data.roles.) return {error: wsCloseCodes.PAYLOAD_ERROR}; + if (session.authenticated) return {error: wsCloseCodes.PAYLOAD_ERROR}; try { if (!(await session.authenticateWithToken(data.token))) return {error: wsCloseCodes.AUTHENTICATION_ERROR}; } catch(e) {