Skip to content

Commit

Permalink
Handle attachmentLayout (carousel/list) into conversation
Browse files Browse the repository at this point in the history
Enable carousel layout view in emulator or supported channel by processing of parent level parameter builder.AttachmentLayout.carousel or builder.AttachmentLayout.list into makeOutgoing

Sample :

{
  "attachmentLayout": "carousel",
  "attachments": [
    {
      "content": {
        "buttons": [
          {
            "title": "Button",
            "type": "postBack",
            "value": "payloadwxcvb"
          }, ...

Change has no harm at all
  • Loading branch information
InnoraG committed Nov 24, 2019
1 parent 7bc2b88 commit 5e42b33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/botkit/src/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,9 @@ export class BotkitConversation<O extends object = {}> extends Dialog<O> {
}

outgoing.channelData = outgoing.channelData ? outgoing.channelData : {};

if (line.attachmentLayout) {
outgoing.attachmentLayout = line.attachmentLayout;
}
/*******************************************************************************************************************/
// allow dynamic generation of quick replies and/or attachments
if (typeof(line.quick_replies)=='function') {
Expand Down

0 comments on commit 5e42b33

Please sign in to comment.