hackchat-engine 1.1.13 → 1.1.14
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
|
@@ -21,28 +21,10 @@ class SessionStruct {
|
|
|
21
21
|
*/
|
|
22
22
|
setup(data) {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @type {number}
|
|
26
|
-
*/
|
|
27
|
-
this.channelCount = data.chans;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Available public channels and their user count
|
|
24
|
+
* Currently connected channels
|
|
31
25
|
* @type {object}
|
|
32
26
|
*/
|
|
33
|
-
this.
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Current session id
|
|
37
|
-
* @type {string}
|
|
38
|
-
*/
|
|
39
|
-
this.sessionID = data.sessionID;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Current channel count
|
|
43
|
-
* @type {number}
|
|
44
|
-
*/
|
|
45
|
-
this.userCount = data.users;
|
|
27
|
+
this.channels = data.channels;
|
|
46
28
|
|
|
47
29
|
/**
|
|
48
30
|
* Was this a new or renewed session
|
|
@@ -50,13 +32,11 @@ class SessionStruct {
|
|
|
50
32
|
*/
|
|
51
33
|
this.restored = data.restored;
|
|
52
34
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
}
|
|
35
|
+
/**
|
|
36
|
+
* The new token
|
|
37
|
+
* @type {string}
|
|
38
|
+
*/
|
|
39
|
+
this.token = data.token;
|
|
60
40
|
}
|
|
61
41
|
}
|
|
62
42
|
|
|
@@ -85,9 +85,9 @@ class SocketHandler extends EventEmitter {
|
|
|
85
85
|
/**
|
|
86
86
|
* Store new client session id when assigned
|
|
87
87
|
*/
|
|
88
|
-
this.client.on(Events.SESSION, (data) =>
|
|
89
|
-
this.sessionID = data.
|
|
90
|
-
|
|
88
|
+
this.client.on(Events.SESSION, (data) =>
|
|
89
|
+
this.sessionID = data.token,
|
|
90
|
+
);
|
|
91
91
|
|
|
92
92
|
// Initiate connection
|
|
93
93
|
this.connect(gateway);
|