@tiledesk/tiledesk-server 2.4.13 → 2.4.15

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/app.js CHANGED
@@ -503,7 +503,7 @@ app.use('/:projectid/campaigns',[passport.authenticate(['basic', 'jwt'], { sessi
503
503
 
504
504
  app.use('/:projectid/emails',[passport.authenticate(['basic', 'jwt'], { session: false }), validtoken, roleChecker.hasRoleOrTypes('agent', ['bot','subscription'])], email);
505
505
 
506
- app.use('/:projectid/properties',[passport.authenticate(['basic', 'jwt'], { session: false }), validtoken, roleChecker.hasRoleOrTypes('owner', ['bot','subscription'])], property);
506
+ app.use('/:projectid/properties',[passport.authenticate(['basic', 'jwt'], { session: false }), validtoken, roleChecker.hasRoleOrTypes('agent', ['bot','subscription'])], property);
507
507
 
508
508
 
509
509
 
@@ -323,6 +323,9 @@ class Chat21Handler {
323
323
  if (message.request && message.request.subject ) {
324
324
  recipient_fullname = message.request.subject;
325
325
  }
326
+ if (message.request && message.request.channel && message.request.channel.name ) {
327
+ attributes['request_channel'] = message.request.channel.name;
328
+ }
326
329
 
327
330
  /*
328
331
  const parsedReply = tiledeskUtil.parseReply(message.text);
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.13",
4
+ "version": "2.4.15",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
@@ -44,7 +44,7 @@
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.79",
47
+ "@tiledesk/tiledesk-tybot-connector": "^0.1.80",
48
48
  "@tiledesk/tiledesk-whatsapp-connector": "^0.1.48",
49
49
  "amqplib": "^0.5.5",
50
50
  "app-root-path": "^3.0.0",
@@ -83,7 +83,9 @@ function startPublisher() {
83
83
  // method to publish a message, will queue messages internally if the connection is down and resend later
84
84
  function publish(exchange, routingKey, content) {
85
85
  try {
86
- pubChannel.publish(exchange, routingKey, content, { persistent: true },
86
+ pubChannel.publish(exchange, routingKey, content, {},
87
+ // pubChannel.publish(exchange, routingKey, content, { persistent: true },
88
+
87
89
  function(err, ok) {
88
90
  if (err) {
89
91
  winston.error("[AMQP] publish", err);
@@ -828,7 +828,7 @@ class WebSocketServer {
828
828
  botUpdateKey = 'faqbot.update.queue.pubsub';
829
829
  }
830
830
 
831
- winston.info('botUpdateKey: ' + botUpdateKey);
831
+ winston.debug('botUpdateKey: ' + botUpdateKey);
832
832
  botEvent.on(botUpdateKey, async function(bot) {
833
833
  setImmediate(async () => {
834
834
 
@@ -841,7 +841,7 @@ class WebSocketServer {
841
841
  }
842
842
 
843
843
  let topic = '/'+bot.id_project+'/bots/'+bot._id;
844
- winston.info('botEvent websocket server: '+botUpdateKey + " on topic " + topic , botJSON);
844
+ winston.debug('botEvent websocket server: '+botUpdateKey + " on topic " + topic , botJSON);
845
845
 
846
846
 
847
847
  pubSubServer.handlePublishMessage (topic, botJSON, undefined, true, "UPDATE");