@cocreate/socket-server 1.4.1 → 1.4.3
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 +16 -0
- package/package.json +3 -3
- package/src/index.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.4.3](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.4.2...v1.4.3) (2022-11-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump [@cocreate](https://github.com/cocreate) dependencies ([fc63f1a](https://github.com/CoCreate-app/CoCreate-socket-server/commit/fc63f1a7474206a12cc4450eeaee869c43ee8d11))
|
|
7
|
+
* emit userStatus was in wrong location preventing it from firing ([3978852](https://github.com/CoCreate-app/CoCreate-socket-server/commit/3978852bdee59ca1f2d7913bb8ad4961c83c4f35))
|
|
8
|
+
* status renamed to userStatus ([7400b16](https://github.com/CoCreate-app/CoCreate-socket-server/commit/7400b160d3779e8b56fe8f8a72e4dab58ba97052))
|
|
9
|
+
|
|
10
|
+
## [1.4.2](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.4.1...v1.4.2) (2022-10-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* bump [@cocreate](https://github.com/cocreate) dependencies ([6ba746a](https://github.com/CoCreate-app/CoCreate-socket-server/commit/6ba746a2ff0f25053d9eedd7e05ccaac1fba6909))
|
|
16
|
+
|
|
1
17
|
## [1.4.1](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.4.0...v1.4.1) (2022-10-01)
|
|
2
18
|
|
|
3
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/socket-server",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "CoCreate-socket-server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cocreate-socket",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://cocreate.app/docs/CoCreate-socket-server",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/docs": "^1.3.
|
|
44
|
-
"@cocreate/uuid": "^1.2.
|
|
43
|
+
"@cocreate/docs": "^1.3.21",
|
|
44
|
+
"@cocreate/uuid": "^1.2.18"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"express": "^4.17.1",
|
package/src/index.js
CHANGED
|
@@ -126,7 +126,7 @@ class SocketServer extends EventEmitter{
|
|
|
126
126
|
const organization_id = socket.config.orgId
|
|
127
127
|
this.recordTransfer('in', message, organization_id)
|
|
128
128
|
|
|
129
|
-
// ToDo remove
|
|
129
|
+
// ToDo: remove
|
|
130
130
|
if (message instanceof Buffer) {
|
|
131
131
|
this.emit('importFile2DB', socket, message);
|
|
132
132
|
console.log('importFile2DB', socket, message);
|
|
@@ -143,9 +143,8 @@ class SocketServer extends EventEmitter{
|
|
|
143
143
|
if (user_id) {
|
|
144
144
|
if (!socket.config.user_id ) {
|
|
145
145
|
socket.config.user_id = user_id
|
|
146
|
-
|
|
147
|
-
this.emit('userStatus', socket, {user_id, status: 'on', organization_id});
|
|
148
146
|
}
|
|
147
|
+
this.emit('userStatus', socket, {user_id, userStatus: 'on', organization_id});
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
//. check permission
|
|
@@ -160,7 +159,8 @@ class SocketServer extends EventEmitter{
|
|
|
160
159
|
//. checking async status....
|
|
161
160
|
if (requestData.data.async == true) {
|
|
162
161
|
console.log('async true')
|
|
163
|
-
const uuid = CoCreateUUID.generate()
|
|
162
|
+
const uuid = CoCreateUUID.generate()
|
|
163
|
+
const asyncMessage = this.asyncMessages.get(socket.config.key);
|
|
164
164
|
socket.config.asyncId = uuid;
|
|
165
165
|
if (asyncMessage) {
|
|
166
166
|
asyncMessage.defineMessage(uuid);
|
|
@@ -178,7 +178,7 @@ class SocketServer extends EventEmitter{
|
|
|
178
178
|
const self = this;
|
|
179
179
|
const responseData = JSON.stringify({
|
|
180
180
|
module: messageName,
|
|
181
|
-
data
|
|
181
|
+
data
|
|
182
182
|
});
|
|
183
183
|
|
|
184
184
|
const asyncId = socket.config.asyncId
|