kuzzle 2.14.13 → 2.14.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.
@@ -92,7 +92,7 @@ export declare class HotelClerk {
92
92
  *
93
93
  * Usually called when an user has been disconnected from Kuzzle.
94
94
  */
95
- removeConnection(connectionId: string): Promise<void>;
95
+ removeConnection(connectionId: string, notify?: boolean): Promise<void>;
96
96
  /**
97
97
  * Clear all connections made to this node:
98
98
  * - trigger appropriate core events
@@ -272,13 +272,13 @@ class HotelClerk {
272
272
  *
273
273
  * Usually called when an user has been disconnected from Kuzzle.
274
274
  */
275
- async removeConnection(connectionId) {
275
+ async removeConnection(connectionId, notify = true) {
276
276
  const connectionRooms = this.subscriptions.get(connectionId);
277
277
  if (!connectionRooms) {
278
278
  // No need to raise an error if the connection does not have room subscriptions
279
279
  return;
280
280
  }
281
- await bluebird_1.default.map(connectionRooms.roomIds, (roomId) => (this.unsubscribe(connectionId, roomId).catch(global.kuzzle.log.error)));
281
+ await bluebird_1.default.map(connectionRooms.roomIds, (roomId) => (this.unsubscribe(connectionId, roomId, notify).catch(global.kuzzle.log.error)));
282
282
  }
283
283
  /**
284
284
  * Clear all connections made to this node:
@@ -286,7 +286,7 @@ class HotelClerk {
286
286
  * - send user exit room notifications
287
287
  */
288
288
  async clearConnections() {
289
- await bluebird_1.default.map(this.subscriptions.keys(), (connectionId) => (this.removeConnection(connectionId)));
289
+ await bluebird_1.default.map(this.subscriptions.keys(), (connectionId) => (this.removeConnection(connectionId, false)));
290
290
  }
291
291
  /**
292
292
  * Register a new subscription
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kuzzle",
3
- "version": "2.14.13",
3
+ "version": "2.14.14",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.14.13",
4
+ "version": "2.14.14",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "bin": {
7
7
  "kuzzle": "bin/start-kuzzle-server"