@tiledesk/tiledesk-server 2.3.80 → 2.3.81

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -6,7 +6,25 @@
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
+
10
+ # 2.3.81 -> PROD v3
11
+ - Added publish method to the chatbot endpoint and fix for SubscriptionNotifier
12
+ - Added request_status and preflight body parameters to send (post) message endpoint
13
+
14
+ # 2.3.80
15
+ - Updated dep tiledesk/tiledesk-whatsapp-connector to 0.1.31
16
+
17
+ # 2.3.79
18
+ - Env fix
19
+
20
+ # 2.3.78
21
+ - Updated dep tiledesk/tiledesk-whatsapp-connector to 0.1.30
22
+ - Added FaqSchema.index({ id_project: 1, id_faq_kb: 1, intent_id: 1 }, { unique: true });
23
+ - Added filter by public and certified to the bot endpoint
24
+ - Added cache invalidation for intent edit and delete
25
+ - Added score field to the bot model
26
+
27
+ # 2.3.77
10
28
  - Updated tiledesk/tiledesk-whatsapp-connector dependency to 0.1.24
11
29
  - Added KALEYRA_API_URL environment variable
12
30
  - 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.81",
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("&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