@tiledesk/tiledesk-tybot-connector 0.1.11 → 0.1.13

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
@@ -1,11 +1,17 @@
1
1
  # Tiledesk tybotRoute
2
2
 
3
- **npm @tiledesk/tiledesk-tybot-connector@0.1.11**
3
+ **npm @tiledesk/tiledesk-tybot-connector@0.1.13**
4
4
 
5
5
  available on:
6
6
  ▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
7
7
 
8
- ### 0.1.11 online - logs update for debug deflect to help center directive parsing
8
+ ### 0.1.13 online
9
+ - replaceAll replaced by replace(//)
10
+ - TEMP: const depId = supportRequest.department._id;
11
+
12
+ ### 0.1.12 online - TEMP: const depId = supportRequest.department._id;
13
+
14
+ ### 0.1.11 online - logs update for debug deflect to help center directive parsing
9
15
 
10
16
  ### 0.1.9 online - set log on ExtApi class
11
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -103,8 +103,8 @@ class DirectivesChatbotPlug {
103
103
  const API_URL = this.API_URL;
104
104
 
105
105
  const requestId = supportRequest.request_id
106
- //const depId = supportRequest.department._id;
107
- const depId = supportRequest.attributes.departmentId;
106
+ const depId = supportRequest.department._id;
107
+ //const depId = supportRequest.attributes.departmentId;
108
108
  const projectId = supportRequest.id_project;
109
109
  const tdclient = new TiledeskClient({
110
110
  projectId: projectId,
@@ -226,8 +226,8 @@ class DirectivesChatbotPlug {
226
226
 
227
227
  console.log("supportRequest", supportRequest)
228
228
  const requestId = supportRequest.request_id
229
- //const depId = supportRequest.department._id;
230
- const depId = supportRequest.attributes.departmentId;
229
+ const depId = supportRequest.department._id;
230
+ //const depId = supportRequest.attributes.departmentId;
231
231
  const projectId = supportRequest.id_project;
232
232
  const tdclient = new TiledeskClient({
233
233
  projectId: projectId,
@@ -105,13 +105,15 @@ class DirDeflectToHelpCenter {
105
105
 
106
106
  if (params.m) {
107
107
  console.log("_params.m:", params.m)
108
- hc_reply = params.m.replaceAll("\\n", "\n");
109
- console.log("hc_reply with replaced slash n", hc_reply)
108
+ //hc_reply = params.m.replaceAll("\\n", "\n");
109
+ hc_reply = params.m.replace(/\\n/g, "\n");
110
+ console.log("hc_reply with replaced slash n regex|replaceAll", hc_reply)
110
111
  }
111
112
  if (params.message) {
112
113
  console.log("_params.message:", params.message)
113
- hc_reply = params.message.replaceAll("\\n", "\n");
114
- console.log("hc_reply -message with replaced slash n", hc_reply)
114
+ //hc_reply = params.message.replaceAll("\\n", "\n");
115
+ hc_reply = params.message.replace(/\\n/g, "\n");
116
+ console.log("hc_reply -message with replaced slash n replace(/\\n/g", hc_reply)
115
117
  }
116
118
  return {
117
119
  workspace_id: workspace_id,