@cocreate/socket-server 1.3.0 → 1.3.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 +21 -0
- package/docs/index.html +1 -1
- package/package.json +1 -1
- package/src/index.js +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [1.3.3](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.3.2...v1.3.3) (2022-08-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* renamed variable broadcast_sender to broadcastSender ([752c5f6](https://github.com/CoCreate-app/CoCreate-socket-server/commit/752c5f6b7ce850ab81883ee39ace9922093bcf5b))
|
|
7
|
+
|
|
8
|
+
## [1.3.2](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.3.1...v1.3.2) (2022-07-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* replaced attribute pass-fetch_value with pass-filter-value ([8697c35](https://github.com/CoCreate-app/CoCreate-socket-server/commit/8697c354bcb07da03a9aaf08ac4e019ebf1a492c))
|
|
14
|
+
|
|
15
|
+
## [1.3.1](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.3.0...v1.3.1) (2022-05-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* get orgId from socketInfo ([481821e](https://github.com/CoCreate-app/CoCreate-socket-server/commit/481821ecf9a53bc9618d8bb87b11f4509270aced))
|
|
21
|
+
|
|
1
22
|
# [1.3.0](https://github.com/CoCreate-app/CoCreate-socket-server/compare/v1.2.2...v1.3.0) (2022-05-14)
|
|
2
23
|
|
|
3
24
|
|
package/docs/index.html
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -159,6 +159,7 @@ class SocketServer extends EventEmitter{
|
|
|
159
159
|
|
|
160
160
|
//. checking async status....
|
|
161
161
|
if (requestData.data.async == true) {
|
|
162
|
+
console.log('async true')
|
|
162
163
|
const uuid = CoCreateUUID.generate(), asyncMessage = this.asyncMessages.get(socketInfo.key);
|
|
163
164
|
socketInfo.asyncId = uuid;
|
|
164
165
|
if (asyncMessage) {
|
|
@@ -197,7 +198,7 @@ class SocketServer extends EventEmitter{
|
|
|
197
198
|
|
|
198
199
|
if (clients) {
|
|
199
200
|
clients.forEach((client) => {
|
|
200
|
-
if (socket != client || socket == client && data.
|
|
201
|
+
if (socket != client || socket == client && data.broadcastSender != false) {
|
|
201
202
|
if (isAsync) {
|
|
202
203
|
asyncData.push({socket: client, message: responseData})
|
|
203
204
|
} else {
|
|
@@ -213,7 +214,7 @@ class SocketServer extends EventEmitter{
|
|
|
213
214
|
this.clients.forEach((value, key) => {
|
|
214
215
|
if (key.includes(room_key)) {
|
|
215
216
|
value.forEach(client => {
|
|
216
|
-
if (socket != client || socket == client && data.
|
|
217
|
+
if (socket != client || socket == client && data.broadcastSender != false) {
|
|
217
218
|
if (isAsync) {
|
|
218
219
|
asyncData.push({socket: client, message: responseData})
|
|
219
220
|
} else {
|
|
@@ -233,7 +234,7 @@ class SocketServer extends EventEmitter{
|
|
|
233
234
|
|
|
234
235
|
}
|
|
235
236
|
|
|
236
|
-
send(socket, messageName, data,
|
|
237
|
+
send(socket, messageName, data, socketInfo){
|
|
237
238
|
const asyncId = this.getAsyncId(socketInfo)
|
|
238
239
|
let responseData = JSON.stringify({
|
|
239
240
|
module: messageName,
|
|
@@ -245,7 +246,9 @@ class SocketServer extends EventEmitter{
|
|
|
245
246
|
} else {
|
|
246
247
|
socket.send(responseData);
|
|
247
248
|
}
|
|
248
|
-
|
|
249
|
+
|
|
250
|
+
if (socketInfo && socketInfo.orgId)
|
|
251
|
+
this.recordTransfer('out', responseData, socketInfo.orgId)
|
|
249
252
|
|
|
250
253
|
}
|
|
251
254
|
|