@tiledesk/tiledesk-server 2.4.24 → 2.4.26

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
+ # 2.4.26
9
+ - filter by priority
10
+ - bugfix intent invalidation by intent id
11
+
12
+ # 2.4.25
13
+ - "@tiledesk/tiledesk-tybot-connector": "^0.1.81"
14
+ - bugfix intent invalidation by intent_display_name
15
+
16
+ # 2.4.24
17
+ - Wildcard invalidate bugfix for intents, subscriptions and triggers
18
+
19
+ # 2.4.23
20
+ - waiting time chance invalidation fix
21
+ - delete redis fix
22
+
23
+ # 2.4.22
24
+ - bugfix changed del method from cachemon to native redis
25
+
26
+ # 2.4.21
27
+ - changed del method from cachemon to native redis
28
+
29
+ # 2.4.20
30
+ - removed unused redis delete with wildcard
31
+
32
+ # 2.4.19
33
+ - Added QUEUE_NAME env parameter
34
+
8
35
  # 2.4.18
9
36
  - logfix
10
37
 
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.24",
4
+ "version": "2.4.26",
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.80",
48
- "@tiledesk/tiledesk-whatsapp-connector": "^0.1.48",
47
+ "@tiledesk/tiledesk-tybot-connector": "^0.1.81",
48
+ "@tiledesk/tiledesk-whatsapp-connector": "^0.1.49",
49
49
  "amqplib": "^0.5.5",
50
50
  "app-root-path": "^3.0.0",
51
51
  "bcrypt-nodejs": "0.0.3",
@@ -832,8 +832,9 @@
832
832
  function invalidateFaq(client, faq) {
833
833
 
834
834
  // let faqCacheKey = "cacheman:cachegoose-cache:faqs:botid:"+ botId + ":faq:id:" + key;
835
-
836
- key = "faqs:botid:"+faq.id_faq_kb+":faq:id:"+faq._id;
835
+ //cacheman:cachegoose-cache:faqs:botid:647dc3e8da041c001396f764:faq:id:647dc3ea61ad510014ca0b46
836
+ key = "faqs:botid:"+faq.id_faq_kb+":faq:id:"+faq.intent_display_name;
837
+ // key = "faqs:botid:"+faq.id_faq_kb+":faq:id:"+faq._id;
837
838
  // key = "faqs:botid:"+faq.id_faq_kb+":faq:id:*";
838
839
  winston.verbose("Deleting cache for faq with key: " + key);
839
840
  // found del
@@ -843,6 +844,16 @@
843
844
  winston.verbose("Deleted cache for faq",{err:err});
844
845
  });
845
846
 
847
+
848
+
849
+ key = "faqs:botid:"+faq.id_faq_kb+":faq:id:#"+faq.intent_id;
850
+ winston.verbose("Deleting cache for faq with key: " + key);
851
+ // found del
852
+ del(client._cache._engine.client, key, function (err, reply) { //tested
853
+ // client.del(key, function (err, reply) {
854
+ winston.debug("Deleted cache for faq",reply);
855
+ winston.verbose("Deleted cache for faq",{err:err});
856
+ });
846
857
 
847
858
  }
848
859
 
@@ -22,16 +22,18 @@ class Listener {
22
22
  var password = process.env.CACHE_REDIS_PASSWORD;
23
23
  winston.debug("Redis password: "+ password);
24
24
 
25
-
26
25
  let graph_url = process.env.META_GRAPH_URL || config.graphUrl || "https://graph.facebook.com/v14.0/"
27
26
  winston.debug("Whatsapp graph_url: "+ password);
28
27
 
28
+ let baseFileUrl = process.env.BASE_FILE_URL
29
+
29
30
  let log = process.env.WHATSAPP_LOG || false
30
31
  winston.debug("Whatsapp log: "+ log);
31
32
 
32
33
  whatsapp.startApp({
33
34
  MONGODB_URL: config.databaseUri,
34
35
  API_URL: apiUrl,
36
+ BASE_FILE_URL: baseFileUrl,
35
37
  GRAPH_URL: graph_url,
36
38
  BASE_URL: apiUrl + "/modules/whatsapp",
37
39
  APPS_API_URL: apiUrl + "/modules/apps",