将Microsoft Bot加载到MS团队工作,但我无法与机器人

时间:2018-04-02 18:03:02

标签: json botframework microsoft-teams

我一直在使用.NET SDK为Microsoft Teams开发机器人。以前,我毫不费力地将机器人加载到团队中并与之交互。我可以@mention团队中的机器人,我可以与它进行一对一的聊天。

最近,我更新了机器人和manifest.json,因此我将其从团队中删除并重新添加。僵尸程序已成功添加到团队中,但是,我不能再@mention它和我之前已经存在的1对1。我向机器人输入消息的文本字段已经消失。

有趣的是,如果我从团队中删除僵尸程序并且不重新添加它,我可以回到与它进行一对一的对话,并返回发送消息的文本字段。

有没有人经历过这种行为,或者知道我错过了什么?提前致谢!

以下是我的manifest.json,其中包含识别文字:

{
    "$schema": "https://statics.teams.microsoft.com/sdk/v1.2/manifest/MicrosoftTeams.schema.json",
    "manifestVersion": "1.2",
    "version": "1.1.2",
    "id": "appId",
    "packageName": "com.example.app",
    "developer": {
        "name": "name",
        "websiteUrl": "https://example.com/",
        "privacyUrl": "https://example.com/privacy",
        "termsOfUseUrl": "https://example.com/terms"
    },
    "name": {
        "short": "shortName",
        "full": "this is the full name"
    },
    "description": {
        "short": "Short description.",
        "full": "Longer description."
    },
    "icons": {
        "outline": "20.png",
        "color": "96.png"
    },
    "accentColor": "#b00b2d",
    "bots": [{
        "botId": "appId",
        "needsChannelSelector": "true",
        "isNotificationOnly": "false",
        "scopes": ["team", "personal"],
        "commandLists": [{
            "scopes": ["team", "personal"],
            "commands": [{
                    "title": "command1",
                    "description": "Do this command"
                },
                {
                    "title": "command2",
                    "description": "Do this command"
                },
                {
                    "title": "command3",
                    "description": "Do this command"
                }
            ]
        }]
    }],
    "permissions": [
        "identity",
        "messageTeamMembers"
    ]
}

1 个答案:

答案 0 :(得分:1)

isNotificationOnly实际上是一个布尔字段,而不是字符串字段。在清单中更改此内容:

"isNotificationOnly": false,

我们最近发布了“仅通知机器人”功能,在这种情况下,我们关闭文本框以向机器人输入命令。我们应该在sideloading上给你一个模式验证错误,但我们不这样做。我们会解决这个问题。

非空字符串在JavaScript中是真实的,因此"false"的评估结果为true