hackchat-engine 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/util/Constants.js
CHANGED
|
@@ -66,7 +66,7 @@ class SocketController extends EventEmitter {
|
|
|
66
66
|
*/
|
|
67
67
|
connect(gateway) {
|
|
68
68
|
if (!this.connection) {
|
|
69
|
-
this.connection = new SocketHandler(this, gateway);
|
|
69
|
+
this.connection = new SocketHandler(this, gateway, this.client.options.session);
|
|
70
70
|
return true;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -16,7 +16,7 @@ class SocketHandler extends EventEmitter {
|
|
|
16
16
|
* @param {SocketController} controller Controller of this handler
|
|
17
17
|
* @param {string} gateway Target gateway address to connect to
|
|
18
18
|
*/
|
|
19
|
-
constructor(controller, gateway) {
|
|
19
|
+
constructor(controller, gateway, session) {
|
|
20
20
|
super();
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -80,7 +80,7 @@ class SocketHandler extends EventEmitter {
|
|
|
80
80
|
* Current session id
|
|
81
81
|
* @type {string}
|
|
82
82
|
*/
|
|
83
|
-
this.sessionID =
|
|
83
|
+
this.sessionID = session;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* Store new client session id when assigned
|
|
@@ -389,7 +389,7 @@ class SocketHandler extends EventEmitter {
|
|
|
389
389
|
const payload = {
|
|
390
390
|
cmd: OPCodes.SESSION,
|
|
391
391
|
isBot: this.client.options.isBot,
|
|
392
|
-
|
|
392
|
+
token: this.sessionID,
|
|
393
393
|
};
|
|
394
394
|
|
|
395
395
|
return this.send(payload);
|