[英]Adaptive card is not rendered on Teams mobile app
We have an external bot configured to use MS Teams channel using message end point web hook.我们有一个外部机器人,配置为使用消息端点 Web 挂钩使用 MS Teams 通道。 The following is the message posted to the Ms Teams channel by the external bot.
以下是外部机器人发布到 Ms Teams 频道的消息。 This response gets rendered as expected when MS Teams is accessed via web browser or MS Teams application on desktop computer.
当通过 Web 浏览器或台式计算机上的 MS Teams 应用程序访问 MS Teams 时,此响应会按预期呈现。 However, the card is not rendered (seeing an empty line/block without any content) when used with Teams application on an android mobile phone.
但是,在 Android 手机上与 Teams 应用程序一起使用时,不会呈现卡片(看到没有任何内容的空行/块)。 Would like to know what is going wrong here?Is this feature not supported on mobile?
想知道这里出了什么问题?移动设备不支持此功能吗? or are we missing something?
或者我们错过了什么?
"channelData":{
"tenant":{
"id":"xxxxxxxxxxxxxx"
}
},
"attachments":[
{
"contentType":"application/vnd.microsoft.card.adaptive",
"content":{
"fallbackText":"Adaptive card version not supported",
"type":"AdaptiveCards",
"body":[
{
"text":"Here is an adaptive card with a link to a task module",
"type":"TextBlock"
},
{
"type":"Image",
"url":"http://adaptivecards.io/content/cats/1.png"
}
],
"version":"1.0",
"actions":[
{
"type":"Action.OpenUrl",
"title":"Open Link",
"url":"https://teams.microsoft.com/l/task/xxxxx?url=https%3A%2F%2Fwww.wikipedia.com%0A&height=large&width=large&title=Wikipedia-Embed"
}
]
}
}
],
"replyToId":"xxxxxx",
"serviceUrl":"https://smba.trafficmanager.net/amer/",
"recipient":{
"name":"xxxx xxxx",
"aadObjectId":"xxxxx",
"id":"xx:xxxxxxxx"
},
"localTimestamp":"2020-02-14T15:21:41.1360000-08:00",
"channelType":"msteams",
"from":{
"name":"xxxxxx",
"id":"xx:xxxxx"
},
"type":"message",
"conversation":{
"conversationType":"personal",
"tenantId":"xxxxxx",
"id":"x:xxxxxx"
}
}```
You need to make sure the card's "type" is "AdaptiveCard"
and not "AdaptiveCards"
.您需要确保卡的“类型”是
"AdaptiveCard"
而不是"AdaptiveCards"
。
{
"fallbackText":"Adaptive card version not supported",
"type":"AdaptiveCard",
"body":[
{
"text":"Here is an adaptive card with a link to a task module",
"type":"TextBlock"
},
{
"type":"Image",
"url":"http://adaptivecards.io/content/cats/1.png"
}
],
"version":"1.0",
"actions":[
{
"type":"Action.OpenUrl",
"title":"Open Link",
"url":"https://teams.microsoft.com/l/task/xxxxx?url=https%3A%2F%2Fwww.wikipedia.com%0A&height=large&width=large&title=Wikipedia-Embed"
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.