diff --git a/bfrontend/src/API/Gateway/GatewayConnection.js b/bfrontend/src/API/Gateway/GatewayConnection.js index 1f6859b..81ac6a1 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, attributes=["PRESENCE_UPDATES", "SAVE_MESSAGES"]) { +GatewayConnection.prototype.connect = function(token, attributes=["PRESENCE_UPDATES"]) { if (token) this.token = token; if (this.token) token = this.token; diff --git a/bfrontend/src/API/Gateway/globalGatewayConnection.js b/bfrontend/src/API/Gateway/globalGatewayConnection.js index cfa57a0..15f8655 100644 --- a/bfrontend/src/API/Gateway/globalGatewayConnection.js +++ b/bfrontend/src/API/Gateway/globalGatewayConnection.js @@ -18,6 +18,7 @@ const wsCloseCodes = { NOT_AUTHORIZED: [4006, "Not authorized"], FLOODING: [4007, "Flooding"], NO_PING: [4008, "No ping"], + UNSUPPORTED_ATTRIBUTE: [4009, "Unsupported attribute."], }; const cancelReconnectionForCodes = [ wsCloseCodes.NOT_AUTHENTICATED[0], @@ -25,6 +26,7 @@ const cancelReconnectionForCodes = [ wsCloseCodes.SERVER_DENIED_CONNECTION[0], wsCloseCodes.TOO_MANY_SESSIONS[0], wsCloseCodes.FLOODING[0], + wsCloseCodes.UNSUPPORTED_ATTRIBUTE[0], ]; globalGatewayConnection.onopen = (sessionData) => { @@ -86,6 +88,4 @@ globalGatewayConnection.onclose = function(code) { }, 5000); }; -window.___gateway = globalGatewayConnection; - export default globalGatewayConnection;