@tiledesk/tiledesk-tybot-connector 0.2.62-rc2 → 0.2.62-rc4

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
@@ -5,6 +5,9 @@
5
5
  available on:
6
6
  ▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
7
7
 
8
+ # v0.2.62-rc4
9
+ - Whatsapp fix (transcript error whitout "senderFullname")
10
+
8
11
  # v0.2.62-rc1
9
12
  - Added VXML actions (speech_form, play_prompt)
10
13
 
@@ -335,8 +335,11 @@ class TiledeskChatbotUtil {
335
335
  }
336
336
 
337
337
  static async updateConversationTranscript(chatbot, message) {
338
+ if (!message || !message.senderFullname) { // not a conversation, can it be an Automation invocation?
339
+ return null;
340
+ }
341
+
338
342
  const chatbot_name = chatbot.bot.name.trim();
339
-
340
343
  if (message && message.text && message.text.trim() !== "" && message.sender !== "_tdinternal" && !this.isHiddenMessage(message)) {
341
344
  let transcript = await chatbot.getParameter("transcript");
342
345
  // console.log("transcript got:", transcript);
@@ -354,6 +357,9 @@ class TiledeskChatbotUtil {
354
357
  }
355
358
 
356
359
  function name_of(message, chatbot_name) {
360
+ if (!message.senderFullname) {
361
+ return null;
362
+ }
357
363
  let fullName = message.senderFullname;
358
364
  if (fullName.trim() === chatbot_name) {
359
365
  fullName = "bot:" + fullName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.2.62-rc2",
3
+ "version": "0.2.62-rc4",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {