Microsoft团队:查询结果上的消息扩展选择项目Invoke并同时在iOS上粘贴缩略图卡片。
我正在建立一个具有组合扩展(搜索扩展)功能的Microsoft Teams Bot。用户打开搜索扩展名,它将从后端获取。我正在使用英雄卡来显示结果列表。我还将TAP功能添加到英雄卡中。这意味着,当用户选择结果时,后端调用呼叫将带有一些特定数据,并且通过该数据,我会构建自适应卡。
此功能在Mac,Web和Android应用程序中效果很好。但是,使用本机iOS应用程序,不仅可以触发调用电话,还可以在团队组成区域粘贴缩略图卡。
我正在使用iOS版本15.5和Teams版本4.11.0
这是我为搜索扩展而构建的响应,
{
"composeExtension": {
"type": "result",
"attachmentLayout": "list",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.thumbnail",
"content": {
"images": [
{
"url": "https:/localhost/93/937083/Public/img3-a68ff7.jpeg"
}
],
"subtitle": "Subtitle",
"text": "Sample text",
"title": "Thumbnail card title"
},
"preview": {
"contentType": "application/vnd.microsoft.card.hero",
"content": {
"buttons": null,
"images": [
{
"url": "https:/localhost/93/937083/Public/img3-a68ff7.jpeg"
}
],
"subtitle": "Subtitle",
"tap": {
"type": "invoke",
"value": {
"type": "SELECT_CALLBACK",
"selectedItemId": 1001
}
},
"text": "Sample text",
"title": "Thumbnail card title"
}
}
}
]
}
}
这是一个屏幕截图:
I'm building a Microsoft Teams bot with Compose Extension (Search extension) functionality. As soon as the user opens the search extension it fetches results from the backend. I'm using hero cards to show the result list. I have also added tap functionality into hero cards. That means when a user selects a result a backend invoke call will be triggered with some specific data and with that data I build an adaptive card.
This feature works well in Teams mac, web, and android apps. But with the native iOS app, not only triggers the invoke call but also pastes a thumbnail card on the Teams compose area.
I'm using iOS version 15.5 and Teams version 4.11.0
This is the response I'm building for the Search extension
{
"composeExtension": {
"type": "result",
"attachmentLayout": "list",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.thumbnail",
"content": {
"images": [
{
"url": "https:/localhost/93/937083/Public/img3-a68ff7.jpeg"
}
],
"subtitle": "Subtitle",
"text": "Sample text",
"title": "Thumbnail card title"
},
"preview": {
"contentType": "application/vnd.microsoft.card.hero",
"content": {
"buttons": null,
"images": [
{
"url": "https:/localhost/93/937083/Public/img3-a68ff7.jpeg"
}
],
"subtitle": "Subtitle",
"tap": {
"type": "invoke",
"value": {
"type": "SELECT_CALLBACK",
"selectedItemId": 1001
}
},
"text": "Sample text",
"title": "Thumbnail card title"
}
}
}
]
}
}
Here is a screenshot for reference:
hero card on the compose area and adaptive card on the background built by invoked value
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论