@cocreate/socket-server 1.21.2 → 1.21.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.21.4](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.21.3...v1.21.4) (2023-10-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * socket push conditions ([887fef3](https://github.com/CoCreate-app/CoCreate-socket-server/commit/887fef3d86d35eb9a0832dd1d0cd998652a494dc))
7
+
8
+ ## [1.21.3](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.21.2...v1.21.3) (2023-10-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump dependencies ([43243af](https://github.com/CoCreate-app/CoCreate-socket-server/commit/43243af35bb1ec196b9ca76b9673024b06a5dca8))
14
+
1
15
  ## [1.21.2](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.21.1...v1.21.2) (2023-10-24)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/socket-server",
3
- "version": "1.21.2",
3
+ "version": "1.21.4",
4
4
  "description": "CoCreate-socket-server",
5
5
  "keywords": [
6
6
  "cocreate-socket",
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "homepage": "https://cocreate.app/docs/CoCreate-socket-server",
42
42
  "dependencies": {
43
- "@cocreate/config": "^1.6.1",
43
+ "@cocreate/config": "^1.6.5",
44
44
  "@cocreate/uuid": "^1.7.2",
45
- "@cocreate/utils": "^1.25.0",
45
+ "@cocreate/utils": "^1.26.1",
46
46
  "ws": "7.5.9"
47
47
  }
48
48
  }
package/src/index.js CHANGED
@@ -172,7 +172,10 @@ class SocketServer extends EventEmitter {
172
172
  if (!this.sockets.has(socket.id)) {
173
173
  this.sockets.set(socket.id, socket);
174
174
  this.clients.get(socket.clientId).push(socket);
175
- organization.clients[socket.clientId].push(socket)
175
+ if (!organization.clients[socket.clientId])
176
+ organization.clients[socket.clientId] = [socket]
177
+ else
178
+ organization.clients[socket.clientId].push(socket)
176
179
  }
177
180
 
178
181
  if (socket.user_id) {