@cocreate/organizations 1.2.0 → 1.2.1
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 +8 -0
- package/package.json +1 -1
- package/src/server.js +4 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.2.1](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.2.0...v1.2.1) (2022-03-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* removed param isExact from broadcast as it can be handled by param room ([241b0fe](https://github.com/CoCreate-app/CoCreate-organizations/commit/241b0fec1bd0251604bd43b7cc0d6273c23d4342))
|
|
7
|
+
* update param roomInfo to socketInfo ([fadc197](https://github.com/CoCreate-app/CoCreate-organizations/commit/fadc197cd647b0e951895f787bee6f4f2c92f6d6))
|
|
8
|
+
|
|
1
9
|
# [1.2.0](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.1.68...v1.2.0) (2022-03-03)
|
|
2
10
|
|
|
3
11
|
|
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -9,9 +9,9 @@ class CoCreateOrganization {
|
|
|
9
9
|
|
|
10
10
|
init() {
|
|
11
11
|
if (this.wsManager) {
|
|
12
|
-
this.wsManager.on('createOrgNew', (socket, data,
|
|
13
|
-
this.wsManager.on('createOrg', (socket, data,
|
|
14
|
-
this.wsManager.on('deleteOrg', (socket, data,
|
|
12
|
+
this.wsManager.on('createOrgNew', (socket, data, socketInfo) => this.createOrgNew(socket, data));
|
|
13
|
+
this.wsManager.on('createOrg', (socket, data, socketInfo) => this.createOrg(socket, data));
|
|
14
|
+
this.wsManager.on('deleteOrg', (socket, data, socketInfo) => this.deleteOrg(socket, data));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -62,11 +62,7 @@ class CoCreateOrganization {
|
|
|
62
62
|
const response = { ...data, document_id: result.ops[0]._id, data: result.ops[0] }
|
|
63
63
|
|
|
64
64
|
self.wsManager.send(socket, 'createOrg', response );
|
|
65
|
-
|
|
66
|
-
self.wsManager.broadcast(socket, data.namespace || data['organization_id'] , data.room, 'createDocument', response, true);
|
|
67
|
-
} else {
|
|
68
|
-
self.wsManager.broadcast(socket, data.namespace || data['organization_id'], null, 'createDocument', response)
|
|
69
|
-
}
|
|
65
|
+
self.wsManager.broadcast(socket, data.namespace || data['organization_id'] , data.room, 'createDocument', response);
|
|
70
66
|
}
|
|
71
67
|
// add new org to masterDb
|
|
72
68
|
const masterOrgDb = self.dbClient.db(data.mdb).collection(data['collection']);
|