@tiledesk/tiledesk-server 2.11.3 → 2.11.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 +5 -1
- package/package.json +1 -1
- package/routes/project.js +12 -4
- package/routes/widget.js +14 -1
- package/services/requestService.js +1 -1
package/CHANGELOG.md
CHANGED
@@ -5,8 +5,12 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
-
# 2.11.
|
8
|
+
# 2.11.5
|
9
|
+
- Added: log in requestService
|
10
|
+
|
11
|
+
# 2.11.4
|
9
12
|
- Added: authentication via Keycloak
|
13
|
+
- Added: project settings fields for allowed_urls, allowed_urls_list, allow_send_emoji
|
10
14
|
|
11
15
|
# 2.10.104
|
12
16
|
- Update: standard/hybrid namespace management
|
package/package.json
CHANGED
package/routes/project.js
CHANGED
@@ -349,9 +349,6 @@ router.put('/:projectid', [passport.authenticate(['basic', 'jwt'], { session: fa
|
|
349
349
|
update["settings.email.notification.conversation.pooled"] = req.body["settings.email.notification.conversation.pooled"];
|
350
350
|
}
|
351
351
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
352
|
if (req.body["settings.email.templates.assignedRequest"]!=undefined) {
|
356
353
|
update["settings.email.templates.assignedRequest"] = req.body["settings.email.templates.assignedRequest"];
|
357
354
|
}
|
@@ -380,7 +377,6 @@ router.put('/:projectid', [passport.authenticate(['basic', 'jwt'], { session: fa
|
|
380
377
|
update["settings.email.templates.emailDirect"] = req.body["settings.email.templates.emailDirect"];
|
381
378
|
}
|
382
379
|
|
383
|
-
|
384
380
|
if (req.body["settings.email.from"]!=undefined) {
|
385
381
|
update["settings.email.from"] = req.body["settings.email.from"];
|
386
382
|
}
|
@@ -452,6 +448,18 @@ router.put('/:projectid', [passport.authenticate(['basic', 'jwt'], { session: fa
|
|
452
448
|
if (req.body["settings.chatbots_attributes_hidden"]!=undefined) {
|
453
449
|
update["settings.chatbots_attributes_hidden"] = req.body["settings.chatbots_attributes_hidden"];
|
454
450
|
}
|
451
|
+
|
452
|
+
if (req.body["settings.allow_send_emoji"]!=undefined) {
|
453
|
+
update["settings.allow_send_emoji"] = req.body["settings.allow_send_emoji"];
|
454
|
+
}
|
455
|
+
|
456
|
+
if (req.body["settings.allowed_urls"]!=undefined) {
|
457
|
+
update["settings.allowed_urls"] = req.body["settings.allowed_urls"];
|
458
|
+
}
|
459
|
+
|
460
|
+
if (req.body["settings.allowed_urls_list"]!=undefined) {
|
461
|
+
update["settings.allowed_urls_list"] = req.body["settings.allowed_urls_list"];
|
462
|
+
}
|
455
463
|
|
456
464
|
if (req.body.widget!=undefined) {
|
457
465
|
update.widget = req.body.widget;
|
package/routes/widget.js
CHANGED
@@ -188,7 +188,7 @@ router.get('/', async (req, res, next) => {
|
|
188
188
|
|
189
189
|
//@DISABLED_CACHE .cache(cacheUtil.queryTTL, "projects:query:id:status:100:"+req.projectid+":select:-settings")
|
190
190
|
|
191
|
-
Project.findOne({_id: req.projectid, status: 100}).select('-
|
191
|
+
Project.findOne({_id: req.projectid, status: 100}).select('-ipFilter -ipFilterEnabled').exec(function(err, project) {
|
192
192
|
// not use .lean I need project.trialExpired
|
193
193
|
|
194
194
|
if (err) {
|
@@ -198,6 +198,19 @@ router.get('/', async (req, res, next) => {
|
|
198
198
|
|
199
199
|
winston.debug("project", project);
|
200
200
|
|
201
|
+
// This code filters the project settings to only include the properties
|
202
|
+
// 'allowed_urls', 'allowed_urls_list', and 'allowed_send_emoji', removing all others.
|
203
|
+
// Removed the "-settings" command from the query that excluded the entire "settings" field from the selection
|
204
|
+
if (project && project.settings) {
|
205
|
+
const { allowed_urls, allowed_urls_list, allow_send_emoji } = project.settings;
|
206
|
+
project.settings = {};
|
207
|
+
Object.assign(project.settings,
|
208
|
+
allowed_urls !== undefined ? { allowed_urls } : {},
|
209
|
+
allowed_urls_list !== undefined ? { allowed_urls_list } : {},
|
210
|
+
allow_send_emoji !== undefined ? { allow_send_emoji } : {}
|
211
|
+
);
|
212
|
+
}
|
213
|
+
|
201
214
|
// ProjectSetter project not found with id: 62d8cf8b2b10b30013bb9b99
|
202
215
|
// Informazioni
|
203
216
|
// 2022-07-27 14:32:14.772 CESTerror: Error getting widget. {"err":"Project Not Found"}
|
@@ -1757,7 +1757,7 @@ class RequestService {
|
|
1757
1757
|
|
1758
1758
|
|
1759
1759
|
if (err) {
|
1760
|
-
winston.error("Error getting closing request ", err);
|
1760
|
+
winston.error("Error getting closing request with request_id: " + request_id, err);
|
1761
1761
|
return reject(err);
|
1762
1762
|
}
|
1763
1763
|
if (!request) {
|