@tiledesk/tiledesk-tybot-connector 0.1.6 → 0.1.7
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 +2 -0
- package/ExtApi.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/tiledeskChatbotPlugs/DirectivesChatbotPlug.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Tiledesk tybotRoute
|
|
2
2
|
|
|
3
|
+
### 0.1.7 online - fixed: converted function process() to Arrow function: const process = (directive) => {}
|
|
4
|
+
|
|
3
5
|
### 0.1.6 online - API_ENDPOINT fix for sendMessageExt. Getting it from tyboyRoute property API_ENDPOINT
|
|
4
6
|
|
|
5
7
|
### 0.1.5 - ExtApi added - New directives added (DirWait, DirMessage, DirReplaceBot)
|
package/ExtApi.js
CHANGED
|
@@ -28,7 +28,7 @@ class ExtApi {
|
|
|
28
28
|
sendSupportMessageExt(message, projectId, requestId, token, callback) {
|
|
29
29
|
const jwt_token = this.fixToken(token);
|
|
30
30
|
const url = `${this.ENDPOINT}/ext/${projectId}/requests/${requestId}/messages`;
|
|
31
|
-
console.log("sendSupportMessageExt URL", url);
|
|
31
|
+
if (this.log) {console.log("sendSupportMessageExt URL", url);}
|
|
32
32
|
const HTTPREQUEST = {
|
|
33
33
|
url: url,
|
|
34
34
|
headers: {
|
package/index.js
CHANGED
|
@@ -150,7 +150,7 @@ router.post('/ext/:projectId/requests/:requestId/messages', async (req, res) =>
|
|
|
150
150
|
token: token,
|
|
151
151
|
APIURL: APIURL,
|
|
152
152
|
APIKEY: "___",
|
|
153
|
-
log:
|
|
153
|
+
log: false
|
|
154
154
|
});
|
|
155
155
|
tdclient.getRequestById(requestId, async (err, request) => {
|
|
156
156
|
let directivesPlug = new DirectivesChatbotPlug(request, APIURL, token, log);
|
package/package.json
CHANGED
|
@@ -235,9 +235,9 @@ class DirectivesChatbotPlug {
|
|
|
235
235
|
|
|
236
236
|
let i = -1;
|
|
237
237
|
if (this.log) { console.log("processing Inline directives:", directives); }
|
|
238
|
-
|
|
238
|
+
const process = (directive) => {
|
|
239
239
|
if (directive) {
|
|
240
|
-
if (this.log) {console.log("
|
|
240
|
+
if (this.log) {console.log("__directive.name:", directive.name);}
|
|
241
241
|
}
|
|
242
242
|
let directive_name = null;
|
|
243
243
|
if (directive && directive.name) {
|