自适应卡中的Action.Submit按钮无法在Skype中呈现

时间:2018-03-06 15:40:03

标签: node.js botframework skype

我有一个简单的自适应卡,在网络聊天应用程序中运行良好,这是卡

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Hello!",
                                    "weight": "bolder",
                                    "isSubtle": true
                                },
                                {
                                    "type": "TextBlock",
                                    "text": "What can I do for you?",
                                    "wrap": true
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Action.ShowCard",
            "title": "Buy",
            "card": {
                "type": "AdaptiveCard",
                "body": [
                    {
                        "type": "TextBlock",
                        "text": "What do you want to buy?",
                        "weight": "bolder"
                    }
                ],
                "actions": [
                    {
                        "type": "Action.Submit",
                        "title": "Ticket",
                        "data": {
                            "action_button": "buy_ticket"
                        }
                    }
                ]
            }
        },
        {
            "type": "Action.ShowCard",
            "title": "Check",
            "card": {
                "type": "AdaptiveCard",
                "body": [
                    {
                        "type": "TextBlock",
                        "text": "Nothing to check",
                        "weight": "bolder"
                    }
                ]
            }
        }
    ]
}

您可以通过粘贴代码在此链接http://adaptivecards.io/visualizer/index.html?hostApp=Skype中看到它。

网络聊天工作正常,你可以在这里看到: enter image description here 但Skype甚至没有呈现Action.Submit按钮。 enter image description here

它应该起作用,因为此卡类型支持Skype。

我还在Android上对它进行了测试,它也有同样的错误。

更新: 我怎样才能创建这样的卡?这是一个skype机器人。 enter image description here

1 个答案:

答案 0 :(得分:1)

Skype目前不完全支持自适应卡,因此预计会出现此行为。虽然自适应卡的某些功能可能在skype中起作用,但它们并未得到完全支持,因此需要这些奇怪的行为。您可以找到支持自适应卡here的频道列表。