@tiledesk/tiledesk-server 2.4.10 → 2.4.12

Sign up to get free protection for your applications and to get access to all the features.
package/models/faq_kb.js CHANGED
@@ -2,6 +2,7 @@ var mongoose = require('mongoose');
2
2
  var Schema = mongoose.Schema;
3
3
  const uuidv4 = require('uuid/v4');
4
4
  var winston = require('../config/winston');
5
+ const { stringify } = require('uuid');
5
6
 
6
7
  var defaultFullTextLanguage = process.env.DEFAULT_FULLTEXT_INDEX_LANGUAGE || "none";
7
8
 
@@ -109,6 +110,18 @@ var Faq_kbSchema = new Schema({
109
110
  type: Boolean,
110
111
  default: true
111
112
  },
113
+ short_description: {
114
+ type: String,
115
+ required: false
116
+ },
117
+ title: {
118
+ type: String,
119
+ required: false
120
+ },
121
+ certifiedTags: {
122
+ type: Array,
123
+ required: false
124
+ }
112
125
  },{
113
126
  timestamps: true
114
127
  }
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.4.10",
4
+ "version": "2.4.12",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
@@ -44,8 +44,8 @@
44
44
  "@tiledesk/tiledesk-kaleyra-proxy": "^0.1.7",
45
45
  "@tiledesk/tiledesk-messenger-connector": "0.1.9",
46
46
  "@tiledesk/tiledesk-rasa-connector": "^1.0.10",
47
- "@tiledesk/tiledesk-tybot-connector": "^0.1.78",
48
- "@tiledesk/tiledesk-whatsapp-connector": "^0.1.46",
47
+ "@tiledesk/tiledesk-tybot-connector": "^0.1.79",
48
+ "@tiledesk/tiledesk-whatsapp-connector": "^0.1.48",
49
49
  "amqplib": "^0.5.5",
50
50
  "app-root-path": "^3.0.0",
51
51
  "bcrypt-nodejs": "0.0.3",
@@ -337,7 +337,7 @@ function listen() {
337
337
  setImmediate(() => {
338
338
  winston.debug("reconnect faqbot.update")
339
339
  publish(exchange, "faqbot_update", Buffer.from(JSON.stringify(bot)));
340
- winston.info("reconnect: "+ Buffer.from(JSON.stringify(bot)))
340
+ winston.debug("reconnect: "+ Buffer.from(JSON.stringify(bot)))
341
341
  });
342
342
  });
343
343
 
@@ -181,7 +181,7 @@ function work(msg, cb) {
181
181
  authEvent.emit('project_user.update.queue.pubsub', JSON.parse(message_string));
182
182
  }
183
183
  if (topic === 'faqbot_update') {
184
- winston.info("reconnectfanout here topic faqbot_update:" + topic);
184
+ winston.debug("reconnectfanout here topic faqbot_update:" + topic);
185
185
  botEvent.emit('faqbot.update.queue.pubsub', JSON.parse(message_string));
186
186
  }
187
187
  cb(true);
@@ -254,7 +254,7 @@ function listen() {
254
254
  setImmediate(() => {
255
255
  winston.debug("reconnect faqbot.update")
256
256
  publish(exchange, "faqbot_update", Buffer.from(JSON.stringify(bot)));
257
- winston.info("reconnect fan: "+ Buffer.from(JSON.stringify(bot)))
257
+ winston.debug("reconnect fan: "+ Buffer.from(JSON.stringify(bot)))
258
258
  });
259
259
  });
260
260
 
package/routes/faq_kb.js CHANGED
@@ -316,6 +316,18 @@ router.put('/:faq_kbid', function (req, res) {
316
316
  if (req.body.trained != undefined) {
317
317
  update.trained = req.body.trained;
318
318
  }
319
+
320
+ if (req.body.short_description != undefined) {
321
+ update.short_description = req.body.short_description
322
+ }
323
+
324
+ if (req.body.title != undefined) {
325
+ update.title = req.body.title
326
+ }
327
+
328
+ if (req.body.certifiedTags != undefined) {
329
+ update.certifiedTags = req.body.certifiedTags
330
+ }
319
331
  // update._id = req.params.faq_kbid;
320
332
 
321
333
  winston.debug("update", update);