@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 +3 -0
- package/models/TiledeskChatbotUtil.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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;
|