@tiledesk/tiledesk-tybot-connector 0.2.118 → 0.2.119
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.120 -> test
|
|
21
|
+
- removed check in go() - it is already in execute() - on SetAttributeV2: if (!action) {...}
|
|
22
|
+
|
|
23
|
+
# v0.2.119 -> test
|
|
24
|
+
- fixed: addParameter("payload", message) => addParameter("payload", message.attributes.payload)
|
|
25
|
+
- JSONCondition: added in constructor => this.chatbot = context.chatbot;
|
|
26
|
+
|
|
20
27
|
# v0.2.118 -> test
|
|
21
28
|
- added payload to attributes: await chatbot.addParameter("payload", message);
|
|
22
29
|
|
|
@@ -714,7 +714,7 @@ class TiledeskChatbotUtil {
|
|
|
714
714
|
// console.log("Adding from message.attributes:", key, "->", value);
|
|
715
715
|
await chatbot.addParameter(key, value);
|
|
716
716
|
}
|
|
717
|
-
await chatbot.addParameter("payload", message);
|
|
717
|
+
await chatbot.addParameter("payload", message.attributes.payload);
|
|
718
718
|
}
|
|
719
719
|
catch(err) {
|
|
720
720
|
console.error("Error importing message payload in request variables:", err);
|
package/package.json
CHANGED
|
@@ -137,7 +137,7 @@ class DirReply {
|
|
|
137
137
|
if (err) {
|
|
138
138
|
console.error("Error sending reply:", err);
|
|
139
139
|
}
|
|
140
|
-
if (this.log) {console.log("Reply message sent", cleanMessage);}
|
|
140
|
+
if (this.log) {console.log("Reply message sent:", JSON.stringify(cleanMessage));}
|
|
141
141
|
const delay = TiledeskChatbotUtil.totalMessageWait(cleanMessage);
|
|
142
142
|
// console.log("got total delay:", delay)
|
|
143
143
|
if (delay > 0 && delay <= 30000) { // prevent long delays
|
|
@@ -97,11 +97,11 @@ class DirSetAttributeV2 {
|
|
|
97
97
|
|
|
98
98
|
async go(action, callback) {
|
|
99
99
|
if (this.log) {console.log("(DirSetAttribute) action before filling:", JSON.stringify(action));}
|
|
100
|
-
if (!action) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
100
|
+
// if (!action) {
|
|
101
|
+
// if (this.log) {console.log("(SetAttributeV2) Error 'action' is missing");}
|
|
102
|
+
// callback();
|
|
103
|
+
// return;
|
|
104
|
+
// }
|
|
105
105
|
if (action && !action.operation) {
|
|
106
106
|
if (this.log) {console.log("(SetAttributeV2) Error operation is mandatory");}
|
|
107
107
|
callback();
|