Hero card

2 posts, 0 answers
  1. Wim
    Wim avatar
    9 posts
    Member since:
    Aug 2012

    Posted 28 May Link to this post

    Hi,

    I tried the examples from your site, just by replacing the directlinekey for the microsoft chatbot with my own key.

    At first sight, everything seems to work just fine.

    But the Kendo chat script throws exceptions when my bot sends it Thumbnail or Video cards.

     

    ReferenceError: timestamp is not defined Stack trace: anonymous@https://kendo.cdn.telerik.com/2018.2.516/js/kendo.all.min.js line 25 > Function:3:66 _renderTemplate@https://kendo.cdn.telerik.com/2018.2.516/js/kendo.all.min.js:38:8446 renderAttachments@https://kendo.cdn.telerik.com/2018.2.516/js/kendo.all.min.js:38:7085 renderAttachments@https://kendo.cdn.telerik.com/2018.2.516/js/kendo.all.min.js:38:13896 renderAttachments@https://runner.telerik.io/result:80:7 onResponse@https://runner.telerik.io/result:67:7 d@https://code.jquery.com/jquery-1.12.4.min.js:2:3854 h</e.prototype.__tryOrUnsub@https://unpkg.com/botframework-directlinejs/directLine.js:1:5125 h</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:4400 a</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3442 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 a</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3442 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 p</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:9074 a</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3442 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 u</e.prototype.notifyNext@https://unpkg.com/botframework-directlinejs/directLine.js:2:23811 i</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:1:29450 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 n@https://unpkg.com/botframework-directlinejs/directLine.js:1:11531 u</e.prototype._innerSub@https://unpkg.com/botframework-directlinejs/directLine.js:2:23554 u</e.prototype._tryNext@https://unpkg.com/botframework-directlinejs/directLine.js:2:23484 u</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:2:23307 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 u</e.prototype.notifyNext@https://unpkg.com/botframework-directlinejs/directLine.js:2:23811 i</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:1:29450 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 a</e.prototype._next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3442 a</e.prototype.next@https://unpkg.com/botframework-directlinejs/directLine.js:1:3125 d</t.prototype.observableWebSocket/</n.onmessage@https://unpkg.com/botframework-directlinejs/directLine.js:1:27613

     

    Does this mean only Hero cards are supported?

     

  2. Bozhidar
    Admin
    Bozhidar avatar
    1176 posts

    Posted 28 May Link to this post

    Hi,

    Since the idea of the Kendo UI Chat is to be framework agnostic, we only included the hero card out of the box, since other frameworks (like DialogFlow for example) use different format for their attachments. We left the definition of other attachment types to the developer by allowing for easy definition of templates in the bot.

    Here's a small dojo which demonstrates how you can add a template for the video attachment type in the Kendo UI Chat:
    https://dojo.telerik.com/oNexokOd

    If you change the directline key to the one you're using you will be able to see the new template when the video attachment is received. Please note that the provided template is a placeholder, and it's up to you to define the exact html, based on the response from the bot.

    Regards,
    Bozhidar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top