From 85c3813dd677f67a44778d8e7e02836a1e50c031 Mon Sep 17 00:00:00 2001 From: hippoz Date: Wed, 15 Sep 2021 16:39:25 +0300 Subject: [PATCH] add support for roles system --- bfrontend/src/API/Gateway/GatewayConnection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bfrontend/src/API/Gateway/GatewayConnection.js b/bfrontend/src/API/Gateway/GatewayConnection.js index c489059..c3ccdf8 100644 --- a/bfrontend/src/API/Gateway/GatewayConnection.js +++ b/bfrontend/src/API/Gateway/GatewayConnection.js @@ -60,7 +60,7 @@ class GatewayConnection { } } -GatewayConnection.prototype.connect = function(token) { +GatewayConnection.prototype.connect = function(token, roles=["PRESENCE_UPDATES"]) { if (token) this.token = token; if (this.token) token = this.token; @@ -90,7 +90,7 @@ GatewayConnection.prototype.connect = function(token) { logGateway("Got HELLO", packet.data); this.helloData = packet.data; logGateway("Sending YOO"); - this.ws.send(this.packet("YOO", { token })); + this.ws.send(this.packet("YOO", { token, roles })); break; } case "EVENT_CHANNEL_MEMBERS": {