简体   繁体   中英

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

I have been developing a bot for Microsoft Teams using the .NET SDK. Previously, I had no trouble sideloading the bot into a Team and interacting with it. I could @mention the bot within the team, and I could engage in 1-on-1 chats with it.

Recently, I updated the bot and the manifest.json , so I removed it from the team and re-added it. The bot was added successfully to the team, however, I can no longer @mention it and in the pre-existing 1-on-1 I had with it. The text field for me to type a message to the bot has disappeared.

Interestingly, if I remove the bot from the team and do not re-add it, I can go back to the 1-on-1 conversation with it and the text field to send messages is back.

Has anyone experienced this behavior, or know what I am missing? Thanks in advance!

Below is my manifest.json , with identifying text replaced:

{
    "$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 is actually a boolean field, not a string field. Change this in your manifest:

"isNotificationOnly": false,

We recently shipped the "notification only bots" feature and in that case we turn off the textbox to enter commands to the bot. We should be giving you a schema validation error on sideloading, but we don't. We'll fix that.

Non-empty strings are truthy in JavaScript so "false" evaluates as true .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM