可以将 Microsoft Bot 加载到 MS Teams 中,但我无法与机器人交互

Loading Microsoft Bot into MS Teams works, but I can't interact with the bot

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

最近,我更新了机器人和 manifest.json,所以我将其从团队中删除并重新添加。该 bot 已成功添加到团队中,但是,我不能再 @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"
    ]
}

isNotificationOnly其实是一个boolean字段,不是string字段。在您的清单中更改此设置:

"isNotificationOnly": false,

我们最近推出了 "notification only bots" 功能,在这种情况下,我们关闭了文本框以向机器人输入命令。我们应该在侧载时给你一个模式验证错误,但我们没有。我们会解决这个问题。

Non-empty 字符串在 JavaScript 中为真,因此 "false" 计算为 true.