@tiledesk/tiledesk-tybot-connector 0.2.141 → 0.2.142

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.2.141",
3
+ "version": "0.2.142",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -210,6 +210,7 @@ class DirectivesChatbotPlug {
210
210
  action: {
211
211
  "_tdThenStop": true,
212
212
  text: message,
213
+ isInfo: true,
213
214
  attributes: {
214
215
  runtimeError: {
215
216
  message: message
@@ -36,7 +36,6 @@ class DirMessage {
36
36
  if (!action.attributes) {
37
37
  action.attributes = {}
38
38
  }
39
-
40
39
  // action.message.attributes.directives = false;
41
40
  // action.message.attributes.splits = false;
42
41
  // action.message.attributes.markbot = false;
@@ -59,25 +58,26 @@ class DirMessage {
59
58
  // console.log("final message action:", JSON.stringify(action));
60
59
  }
61
60
  // DEPRECATED
62
- // else if (directive.parameter) {
63
- // let text = directive.parameter.trim();
64
- // action = {
65
- // text: text,
66
- // attributes: {
67
- // directives: false,
68
- // splits: true,
69
- // markbot: true,
70
- // fillParams: true
71
- // }
72
- // }
73
- // if (directive.name === Directives.HMESSAGE) {
74
- // action.attributes.subtype = "info";
75
- // this.hMessage = true;
76
- // }
77
- // // if (directive.name === Directives.HMESSAGE) {
78
- // // action.sender = "tiledesk";
79
- // // }
80
- // }
61
+ else if (directive.parameter) {
62
+ let text = directive.parameter.trim();
63
+ action = {
64
+ text: text,
65
+ isInfo: true,
66
+ attributes: {
67
+ directives: false,
68
+ splits: true,
69
+ markbot: true,
70
+ fillParams: true
71
+ }
72
+ }
73
+ if (directive.name === Directives.HMESSAGE) {
74
+ action.attributes.subtype = "info";
75
+ // this.hMessage = true;
76
+ }
77
+ // if (directive.name === Directives.HMESSAGE) {
78
+ // action.sender = "tiledesk";
79
+ // }
80
+ }
81
81
  else {
82
82
  console.error("Incorrect directive:", directive);
83
83
  callback();
@@ -98,10 +98,11 @@ class DirMessage {
98
98
  const message = action;
99
99
  if (this.log) {console.log("Message to extEndpoint:", JSON.stringify(message))};
100
100
 
101
- if(this.supportRequest && !this.supportRequest.draft){
101
+ if(!action.isInfo && this.supportRequest && !this.supportRequest.draft){
102
102
  callback();
103
103
  return;
104
104
  }
105
+ delete action.isInfo
105
106
  // if (this.projectId === "656054000410fa00132e5dcc") {
106
107
  // if (!message.text.startsWith('/')) {
107
108
  // callback();