@cocreate/socket-server 1.21.3 → 1.21.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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/index.js +12 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.21.5](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.21.4...v1.21.5) (2023-10-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* disabled message_log ([0977880](https://github.com/CoCreate-app/CoCreate-socket-server/commit/09778807aeaf9b7d574d956e0327d3277554ea19))
|
|
7
|
+
|
|
8
|
+
## [1.21.4](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.21.3...v1.21.4) (2023-10-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* socket push conditions ([887fef3](https://github.com/CoCreate-app/CoCreate-socket-server/commit/887fef3d86d35eb9a0832dd1d0cd998652a494dc))
|
|
14
|
+
|
|
1
15
|
## [1.21.3](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.21.2...v1.21.3) (2023-10-25)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
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]
|
|
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) {
|
|
@@ -424,14 +427,14 @@ class SocketServer extends EventEmitter {
|
|
|
424
427
|
data = authorized.authorized
|
|
425
428
|
|
|
426
429
|
if (data.log !== false && data.log !== 'false' && !data.method.startsWith('read.') && data.method !== 'updateUserStatus' && data.method !== 'userStatus' && data.method !== 'signIn' && data.method !== 'signUp') {
|
|
427
|
-
let object = { url: socket.socketUrl, data }
|
|
428
|
-
delete object.socket
|
|
429
|
-
this.emit('create.object', {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
});
|
|
430
|
+
// let object = { url: socket.socketUrl, data }
|
|
431
|
+
// delete object.socket
|
|
432
|
+
// this.emit('create.object', {
|
|
433
|
+
// method: 'create.object',
|
|
434
|
+
// array: 'message_log',
|
|
435
|
+
// object,
|
|
436
|
+
// organization_id: data.organization_id
|
|
437
|
+
// });
|
|
435
438
|
}
|
|
436
439
|
|
|
437
440
|
let sockets = this.get(data);
|