@tiledesk/tiledesk-whatsapp-connector 0.1.78 → 0.1.80

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/index.js CHANGED
@@ -721,7 +721,7 @@ router.post("/tiledesk", async (req, res) => {
721
721
  return res.sendStatus(200);
722
722
  }
723
723
  }).catch((err) => {
724
- winston.error("(wab) send message error: ", err);
724
+ winston.error("(wab) send message error: ", err.response.data);
725
725
  });
726
726
  } else {
727
727
  winston.error("(wab) WhatsappJsonMessage is undefined!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-whatsapp-connector",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "description": "Tiledesk Whatsapp connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -54,9 +54,7 @@ const path = require('path');
54
54
 
55
55
  winston.debug("(wab) [Translator] tiledesk message: ", tiledeskChannelMessage);
56
56
 
57
- console.log("whatsapp_receiver: ", whatsapp_receiver)
58
57
  let lang = await utils.detectLanguageFromPhone(whatsapp_receiver);
59
- console.log("lang: ", lang)
60
58
 
61
59
  let text = '';
62
60
  if (tiledeskChannelMessage.text) {
@@ -265,9 +263,9 @@ const path = require('path');
265
263
 
266
264
  if (buttons_count > 10) {
267
265
  // too many buttons
268
- // Option 1: Skip message
266
+ // Option 1: Skip message (current)
269
267
  // Option 2: Cut buttons array -> display first 10 buttons only
270
- // Option 3: Send message with *buttons (questa)
268
+ // Option 3: Send message with *buttons
271
269
 
272
270
  whatsapp_message.text = { body: tiledeskChannelMessage.attributes._raw_message };
273
271
  return null;
@@ -351,7 +349,7 @@ const path = require('path');
351
349
  return whatsapp_message;
352
350
  }
353
351
  }
354
-
352
+
355
353
  async createTemplateMessage(template, receiver, params) {
356
354
 
357
355
  let whatsapp_message = {
@@ -444,7 +442,7 @@ const path = require('path');
444
442
 
445
443
 
446
444
  return whatsapp_message;
447
- }
445
+ }
448
446
 
449
447
  async toTiledesk(whatsappChannelMessage, from, media_url) {
450
448
 
Binary file
Binary file
Binary file