Adaptive Card 对传出 webhook 提供的 msteams 的 messageBack 操作失败并显示 "The resource URL is misformatted."

Adaptive Card's messageBack action for msteams provided by outgoing webhook fails with "The resource URL is misformatted."

我已经按照 Extend Microsoft Teams Exercise - Create outgoing webhooks 3-exercise-outgoing-webhooks 构建了一个 MS Teams Outgoing webhook,并成功地实现了 returns 星球主题的自适应卡片。

但是,当我按照 special Adaptive Card functionality that is specific to the Microsoft Teams channel 上的指导添加新的 messageBack 操作时,它无法回复 webhook。

我使用的添加操作被逐字复制并添加到 planetDisplayCard.json 的操作列表中:

  "actions": [
    {
      "type": "Action.OpenUrl",
      "title": "Learn more on Wikipedia"
    },
    {
      "type": "Action.Submit",
      "title": "Click me for messageBack",
      "data": {
        "msteams": {
            "type": "messageBack",
            "displayText": "I clicked this button",
            "text": "text to bots",
            "value": "{\"bfKey\": \"bfVal\", \"conflictKey\": \"from value\"}"
        }
      }
    }

卡片在 Teams 中呈现,但单击按钮时会发生以下情况:

我也看到了我自己托管的 webhook 服务的 HeroCard messageBack CardAction 存在同样的问题;但在尝试诊断问题时,我在本地开发环境中使用 Yeoman Generator for Microsoft Teams 重现了同样的失败。

一张图说明

messageBack 操作是否与 MS Teams 中的传出 Webhook 一起使用?

我没有测试过这个确切的场景,但是传出的 webhook 在某些方面与机器人“相似”,但功能不全,并且无法处理像这样的操作中的多个步骤,对我来说知识。您链接到的“卡片操作”文章在介绍段落中基本上说了很多:

Cards used by bots and messaging extensions...

因此,我建议为这种情况构建一个 full-blown Teams 机器人。您可以查看 here 以开始执行此操作,当然,如果您遇到困难,可以在 S.overflow 上提出任何问题。