@tiledesk/tiledesk-server 2.10.11 → 2.10.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +5 -0
- package/app.js +5 -0
- package/package.json +3 -3
- package/routes/request.js +2 -2
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
+
# 2.10.12
|
9
|
+
- Updated tiledesk-chatbot-template to 0.1.3
|
10
|
+
- Added check on valid mongo id
|
11
|
+
- Removed logs
|
12
|
+
|
8
13
|
# 2.10.11
|
9
14
|
- Updated tybot-connector to 0.2.118
|
10
15
|
- Removed logs
|
package/app.js
CHANGED
@@ -449,6 +449,11 @@ var projectSetter = function (req, res, next) {
|
|
449
449
|
|
450
450
|
if (projectid) {
|
451
451
|
|
452
|
+
if (!mongoose.Types.ObjectId.isValid(projectid)) {
|
453
|
+
winston.warn(`Invalid ObjectId: ${projectid}`);
|
454
|
+
return res.status(400).send({ error: "Invalid project id: " + projectid });
|
455
|
+
}
|
456
|
+
|
452
457
|
let q = Project.findOne({_id: projectid, status: 100});
|
453
458
|
if (cacheEnabler.project) {
|
454
459
|
q.cache(cacheUtil.longTTL, "projects:id:"+projectid) //project_cache
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tiledesk/tiledesk-server",
|
3
3
|
"description": "The Tiledesk server module",
|
4
|
-
"version": "2.10.
|
4
|
+
"version": "2.10.12",
|
5
5
|
"scripts": {
|
6
6
|
"start": "node ./bin/www",
|
7
7
|
"pretest": "mongodb-runner start",
|
@@ -38,7 +38,7 @@
|
|
38
38
|
"dependencies": {
|
39
39
|
"@tiledesk/tiledesk-apps": "^1.0.26",
|
40
40
|
"@tiledesk/tiledesk-chat21-app": "^1.1.8",
|
41
|
-
"@tiledesk/tiledesk-chatbot-templates": "^0.1.
|
41
|
+
"@tiledesk/tiledesk-chatbot-templates": "^0.1.3",
|
42
42
|
"@tiledesk/tiledesk-chatbot-util": "^0.8.33",
|
43
43
|
"@tiledesk/tiledesk-client": "^0.10.10",
|
44
44
|
"@tiledesk/tiledesk-dialogflow-connector": "^1.8.4",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"@tiledesk/tiledesk-rasa-connector": "^1.0.10",
|
49
49
|
"@tiledesk/tiledesk-telegram-connector": "^0.1.14",
|
50
50
|
"@tiledesk/tiledesk-train-jobworker": "^0.0.11",
|
51
|
-
"@tiledesk/tiledesk-tybot-connector": "^0.2.
|
51
|
+
"@tiledesk/tiledesk-tybot-connector": "^0.2.120",
|
52
52
|
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.73",
|
53
53
|
"@tiledesk/tiledesk-whatsapp-jobworker": "^0.0.8",
|
54
54
|
"@tiledesk/tiledesk-sms-connector": "^0.1.10",
|
package/routes/request.js
CHANGED
@@ -766,14 +766,14 @@ router.post('/:requestid/email/send',
|
|
766
766
|
|
767
767
|
|
768
768
|
|
769
|
-
winston.
|
769
|
+
winston.debug("Sending an email with text : " + text + " to request_id " + request_id);
|
770
770
|
|
771
771
|
if (!request.lead.email) {
|
772
772
|
res.json({ "no queued": true });
|
773
773
|
}
|
774
774
|
|
775
775
|
let newto = request.lead.email
|
776
|
-
winston.
|
776
|
+
winston.verbose("Sending an email newto " + newto);
|
777
777
|
|
778
778
|
//sendEmailDirect(to, text, project, request_id, subject, tokenQueryString, sourcePage, payload)
|
779
779
|
emailService.sendEmailDirect(newto, text, req.project, request_id, subject, undefined, undefined, undefined, replyto);
|