Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

button link not showing when returing a card #47

@fspegni

Description

@fspegni

Hello,

I'm having a hard time trying to return a conversational prompt with a card containing a link. I tried reading the documentation and followed one of your tests, but I can't get it working. This is an excerpt of my code:

    conv.add(new Card({
       title: "this is title",
       image: new Image({
         url: OPEN_STREET_MAP_LOGO,
         alt: 'Open Street Map logo',
       }),
       button: new Link({
         name: 'Learn more',
         open: {
           url: 'https://www.google.com/about/',
         },
       }),
    }));

This is the JSON returned by my webhook (copied from the simulator):

{
  "responseJson": {
    "session": { ... },
    "prompt": {
      "override": false,
      "content": {
        "card": {
          "title": "this is title",
          "image": {
            "alt": "Google app logo",
            "height": 0,
            "url": "https://wiki.openstreetmap.org/w/images/thumb/7/79/Public-images-osm_logo.svg/240px-Public-images-osm_logo.svg.png",
            "width": 0
          },
          "button": {
            "name": "Learn more",
            "open": {
              "url": "https://www.google.com/about/"
            }
          }
        }
      },
      "firstSimple": {
        "speech": "Here is a map for your project",
        "text": ""
      }
    }
  }
}

Below you can find the rendered card, without button. Am I doing something wrong here?

bug_conversational_agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions