@tiledesk/tiledesk-tybot-connector 0.2.100 → 0.2.102

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/CHANGELOG.md CHANGED
@@ -17,6 +17,13 @@ available on:
17
17
  - Added flowError on JSONCondition when result = null
18
18
  - Added fix on Filler -->
19
19
 
20
+ # v0.2.102
21
+ - isValid modified: if (parts.length >= 4) instead of "if (parts.length === 4)" that blocked whatsapp requests
22
+
23
+ # v0.2.101
24
+ - Dynamic attribute "now" is a ISOString date
25
+ - MAX_EXECUTION_TIME = 1000 * 3600 * 4 // 4 hours
26
+
20
27
  # v0.2.100 -> test
21
28
  - Added "chatbotToken" to RESERVED attributes
22
29
  - Added UUID, UUIDv4 dynamic attributes
@@ -14,7 +14,7 @@ const { TiledeskChatbotConst } = require('./TiledeskChatbotConst.js');
14
14
  class TiledeskChatbot {
15
15
 
16
16
  static MAX_STEPS = 1000;
17
- static MAX_EXECUTION_TIME = 1000 * 60;// * 60 * 12 // 12 hours = 43.200 secs;
17
+ static MAX_EXECUTION_TIME = 1000 * 3600 * 4; // 4 hours
18
18
 
19
19
  constructor(config) {
20
20
  if (!config.botsDataSource) {
@@ -844,7 +844,7 @@ class TiledeskChatbotUtil {
844
844
  if (requestId.startsWith("support-group-")) {
845
845
  const parts = requestId.split("-");
846
846
  // console.log("parts support request:", parts);
847
- if (parts.length === 4) {
847
+ if (parts.length >= 4) {
848
848
  isValid = (parts[0] === "support" && parts[1] === "group" && parts[2] === projectId && parts[3].length > 0);
849
849
  }
850
850
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.2.100",
3
+ "version": "0.2.102",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,7 @@ class Filler {
11
11
  }
12
12
 
13
13
  parameters["timestamp"] = Date.now(); // type number
14
- parameters["now"] = new Date(); // type Object
14
+ parameters["now"] = new Date().toISOString(); // type Object
15
15
  parameters["UUID"] = uuidv4().replace(/-/g, '');
16
16
  parameters["UUIDv4"] = uuidv4();
17
17