fix(gateway): remove unintended code

This commit is contained in:
hippoz 2021-09-15 15:56:24 +03:00
parent 6376597857
commit 800d778183
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -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) {