【发布时间】:2019-11-27 04:08:22
【问题描述】:
我们有一个侧载的 Microsoft Teams 机器人(称为 Axel),可完全运行并在生产中运行。该机器人能够发送消息(包括主动)、接收消息等。
但是,用户无法启动与机器人的对话 - 机器人必须先发送消息才能使其工作。我相信这不是预期/期望的行为。在搜索选项卡中搜索机器人时,我们会找到它,但点击它的名称时没有任何反应。
我们如何才能让用户与机器人发起对话?
编辑:这是我们经过编辑的 manifest.json 文件
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json",
"manifestVersion": "1.3",
"version": "1.0.0",
"id": "{app_id}",
"packageName": "com.package.name",
"developer": {
"name": "HeyAxel",
"websiteUrl": "https://heyaxel.com",
"privacyUrl": "https://www.heyaxel.com/files/Privacy_Policy.pdf",
"termsOfUseUrl": "https://www.heyaxel.com/files/Privacy_Policy.pdf"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Axel",
"full": "Axel"
},
"description": {
"short": "shortdesc",
"full": "fulldesc"
},
"accentColor": "#F9F9FA",
"bots": [
{
"botId": "{bot_id}",
"scopes": [
"team"
],
"supportsFiles": true,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"{domain1}",
"{domain2}"
]
}
范围的翻译:
- 接收来自我的消息和数据
- 向我发送消息和通知
- 访问个人资料信息
- 在频道中接收用户的消息和数据
- 在频道中发送消息和通知访问团队信息
【问题讨论】:
-
这确实不是正常行为:您应该检查您的配置doc 说
Team owners and users with the appropriate permissions can also add bots as team members (see Interact in a team channel), which not only makes them available in that team's channels, but for personal chat for all of those users as well. -
谢谢@B.Lec。我想避免重新发布,因为它是生产应用程序的开销并且可能容易出错并且需要外部 IT 支持(在客户的租户中)。我会在本地尝试,看看它是否会改变任何东西。回答 1. 确实,该机器人已添加到团队中并且可供用户使用(如果该机器人之前已向他们发送消息,用户可以看到该机器人并正常与之交互)
-
奇怪的东西,会关注这个话题
-
如果您的机器人的目的是向用户发送通知而不是对话式的,您可以在应用清单中将 isNotificationOnly 字段设置为 true,否则禁用它以启动与您的机器人的对话。按照文档在应用清单中添加字段Notification only bots。
标签: botframework microsoft-teams