MS Teams 不接受任务模块负载

MS Teams not accepting task module payload

在尝试使用开发人员预览任务模块时遇到了一个奇怪的问题。

Teams 没有显示我的模块,总是在控制台中告诉我:

<BotError>Error when processing invoke response: Payload is incorrect, field is in the wrong format: task.value

我要发送的是:

{
    "task": {
        "value": {
            "url": "https://<ourbaseserviceurl>",
            "title": "Microsoft Ignite 2018 Vision Keynote",
            "height": 700,
            "width": 1000,
            "fallbackUrl": "<ourbaseserviceurl"
        },
        "type": "message"
    }
}

正在尝试使用示例,但即便如此,atm 似乎也无法正常工作。 URL 在应用程序的允许网址中,我们用来与通常工作正常的机器人进行通信。

请在传递 TaskInfo 对象时将任务类型设置为 continue。这是 文档.

{
    "task": {
        "type": "continue"
        "value": {
            "url": "https://<ourbaseserviceurl>",
            "title": "Microsoft Ignite 2018 Vision Keynote",
            "height": 700,
            "width": 1000,
            "fallbackUrl": "https://<ourbaseserviceurl>"
        },
    }
}

以下是在弹出消息框中显示值的方法:

{
  "task": {
    "type": "message",
    "value": "Message text"
  }
}

如果您遇到任何问题,请尝试告诉我们。