@tiledesk/tiledesk-server 2.3.80 → 2.3.82

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -6,7 +6,27 @@
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
8
 
9
- # 2.3.77 -> PROD v3
9
+ # 2.3.82 -> PROD v3
10
+ - Enable current chabot when &td_draft=true query parameter is passed in the url
11
+
12
+ # 2.3.81
13
+ - Added publish method to the chatbot endpoint and fix for SubscriptionNotifier
14
+ - Added request_status and preflight body parameters to send (post) message endpoint
15
+
16
+ # 2.3.80
17
+ - Updated dep tiledesk/tiledesk-whatsapp-connector to 0.1.31
18
+
19
+ # 2.3.79
20
+ - Env fix
21
+
22
+ # 2.3.78
23
+ - Updated dep tiledesk/tiledesk-whatsapp-connector to 0.1.30
24
+ - Added FaqSchema.index({ id_project: 1, id_faq_kb: 1, intent_id: 1 }, { unique: true });
25
+ - Added filter by public and certified to the bot endpoint
26
+ - Added cache invalidation for intent edit and delete
27
+ - Added score field to the bot model
28
+
29
+ # 2.3.77
10
30
  - Updated tiledesk/tiledesk-whatsapp-connector dependency to 0.1.24
11
31
  - Added KALEYRA_API_URL environment variable
12
32
  - Now GRAPH_URL environment variable is optional
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.3.80",
4
+ "version": "2.3.82",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
package/routes/message.js CHANGED
@@ -169,11 +169,11 @@ async (req, res) => {
169
169
  sourcePage:req.body.sourcePage,
170
170
  language: req.body.language,
171
171
  userAgent:req.body.userAgent,
172
- status:null,
172
+ status:req.body.request_status,
173
173
  createdBy: req.user._id,
174
174
  attributes: req.body.attributes,
175
175
  subject: req.body.subject,
176
- preflight:undefined,
176
+ preflight:req.body.preflight,
177
177
  channel: req.body.channel,
178
178
  location: req.body.location,
179
179
  participants: req.body.participants,
@@ -24,8 +24,9 @@ class BotSubscriptionNotifier {
24
24
 
25
25
  var url = bot.url;
26
26
 
27
- if (bot.type == "tilebot" && payload.request && payload.request.attributes && payload.request.attributes.sourcePage && payload.request.attributes.sourcePage.indexOf("/assets/twp/index.html")>-1) {
28
- url = url + "?forced_bot_id="+bot.id;
27
+ if (bot.type == "tilebot" && payload.request && payload.request.attributes && payload.request.attributes.sourcePage && payload.request.attributes.sourcePage.indexOf("&td_draft=true")>-1) {
28
+ url = url.substr(0,url.lastIndexOf("/")+1)+bot.id;
29
+ // url = url + "?forced_bot_id="+bot.id;
29
30
  winston.verbose("BotSubscriptionNotifier it is a tilebot test page. Switch to current chabot id: "+ url);
30
31
  }
31
32