@cocreate/users 1.37.3 → 1.37.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/client.js +1 -1
- package/src/server.js +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.37.5](https://github.com/CoCreate-app/CoCreate-users/compare/v1.37.4...v1.37.5) (2024-08-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handling session not true or false ([e4991be](https://github.com/CoCreate-app/CoCreate-users/commit/e4991beeaa3832ed9b76ecd664669da3cb0a21a3))
|
|
7
|
+
|
|
8
|
+
## [1.37.4](https://github.com/CoCreate-app/CoCreate-users/compare/v1.37.3...v1.37.4) (2024-07-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* checkSession send ([2b3810f](https://github.com/CoCreate-app/CoCreate-users/commit/2b3810fd31bbd1e4fbd8f7072f5e36c8b13abac4))
|
|
14
|
+
|
|
1
15
|
## [1.37.3](https://github.com/CoCreate-app/CoCreate-users/compare/v1.37.2...v1.37.3) (2024-06-30)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -216,7 +216,7 @@ const CoCreateUser = {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
if (data.userStatus) {
|
|
219
|
-
let sessionElements = document.querySelectorAll('[session]:not([
|
|
219
|
+
let sessionElements = document.querySelectorAll('[session]:not([session="true"], [session="false"])');
|
|
220
220
|
for (let i = 0; i < sessionElements.length; i++)
|
|
221
221
|
sessionElements[i].setAttribute('session', data.userStatus)
|
|
222
222
|
}
|
package/src/server.js
CHANGED
|
@@ -147,17 +147,20 @@ class CoCreateUser {
|
|
|
147
147
|
|
|
148
148
|
async checkSession(data) {
|
|
149
149
|
try {
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
data.method = 'updateUserStatus'
|
|
151
|
+
|
|
152
|
+
if (!data.socket.user_id)
|
|
152
153
|
data.userStatus = 'off'
|
|
154
|
+
else
|
|
155
|
+
data.userStatus = 'on'
|
|
153
156
|
|
|
154
|
-
|
|
155
|
-
}
|
|
157
|
+
this.wsManager.send(data)
|
|
156
158
|
} catch (error) {
|
|
157
159
|
console.log('checkSession error')
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
162
|
|
|
163
|
+
// TODO: email or phone param refrencing the object to execute via api
|
|
161
164
|
async inviteUser(data) {
|
|
162
165
|
try {
|
|
163
166
|
const inviteId = this.crud.ObjectId().toString()
|
|
@@ -308,7 +311,7 @@ class CoCreateUser {
|
|
|
308
311
|
}
|
|
309
312
|
}
|
|
310
313
|
|
|
311
|
-
|
|
314
|
+
// TODO: email or phone param refrencing the object to execute via api
|
|
312
315
|
async forgotPassword(data) {
|
|
313
316
|
const self = this;
|
|
314
317
|
try {
|
|
@@ -372,7 +375,7 @@ class CoCreateUser {
|
|
|
372
375
|
"To": data.email,
|
|
373
376
|
"Subject": "Reset Your Password Easily",
|
|
374
377
|
"HtmlBody": htmlBody,
|
|
375
|
-
"TextBody": "Hello, \n\nWe received a request to reset the password for your account.If you did not make this request, please ignore this email.Otherwise, you can reset your password by copying and pasting the following link into your browser: https://example.com/reset-password\n\nThis link will expire in 24 hours for your security.\n\nNeed more help? Our support team is here for you at support@example.com.\n\nThank you for using our services!\n\nBest regards,\nThe [Your Company] Team",
|
|
378
|
+
"TextBody": "Hello, \n\nWe received a request to reset the password for your account. If you did not make this request, please ignore this email. Otherwise, you can reset your password by copying and pasting the following link into your browser: https://example.com/reset-password\n\nThis link will expire in 24 hours for your security.\n\nNeed more help? Our support team is here for you at support@example.com.\n\nThank you for using our services!\n\nBest regards,\nThe [Your Company] Team",
|
|
376
379
|
"MessageStream": "outbound"
|
|
377
380
|
},
|
|
378
381
|
organization_id: data.organization_id
|