@folklore/socket 0.4.22 → 0.4.24

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/dist/cjs.js CHANGED
@@ -21,6 +21,7 @@ class PubNubSocket extends EventEmitter {
21
21
  publishKey: null,
22
22
  subscribeKey: null,
23
23
  secretKey: null,
24
+ withPresence: false,
24
25
  ...opts
25
26
  };
26
27
  this.onReady = this.onReady.bind(this);
@@ -143,10 +144,16 @@ class PubNubSocket extends EventEmitter {
143
144
  this.shouldStart = true;
144
145
  return;
145
146
  }
147
+ const {
148
+ subscriptionOptions,
149
+ withPresence
150
+ } = this.options;
146
151
  this.shouldStart = false;
147
152
  this.starting = true;
148
153
  this.pubnub.subscribe({
149
- channels: this.channels
154
+ channels: this.channels,
155
+ subscriptionOptions,
156
+ withPresence
150
157
  });
151
158
  this.emit('start');
152
159
  }
package/dist/es.js CHANGED
@@ -17,6 +17,7 @@ class PubNubSocket extends EventEmitter {
17
17
  publishKey: null,
18
18
  subscribeKey: null,
19
19
  secretKey: null,
20
+ withPresence: false,
20
21
  ...opts
21
22
  };
22
23
  this.onReady = this.onReady.bind(this);
@@ -139,10 +140,16 @@ class PubNubSocket extends EventEmitter {
139
140
  this.shouldStart = true;
140
141
  return;
141
142
  }
143
+ const {
144
+ subscriptionOptions,
145
+ withPresence
146
+ } = this.options;
142
147
  this.shouldStart = false;
143
148
  this.starting = true;
144
149
  this.pubnub.subscribe({
145
- channels: this.channels
150
+ channels: this.channels,
151
+ subscriptionOptions,
152
+ withPresence
146
153
  });
147
154
  this.emit('start');
148
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/socket",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
4
4
  "description": "Socket utilities",
5
5
  "keywords": [
6
6
  "javascript",
@@ -56,5 +56,5 @@
56
56
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
57
57
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
58
58
  },
59
- "gitHead": "31902f297e4769f95799a311a3da25bda2e72632"
59
+ "gitHead": "b6a18894ee220306fc027de04e02e08f1f60b1ba"
60
60
  }