简体   繁体   中英

Teams task module with adaptive card does not open for another user and crashes teams

I am working on developing a Teams App using the Bot framework Java SDK v4.13 (bot-integration-spring). I have imported the app into my teams by uploading a custom app.

We have a search based messaging extension which shows list items and then selecting an item produces an adaptive card in the compose box which I can send across in a channel or to another user in teams. The bot is not a participant in the conversations - channel, group chat, 1-1 with another user.

I added a Action.Submit button on the adaptive card to fetch a task module (popup) on this card as below.

{
        "data": {
            "msteams": {
                "type": "task/fetch"
            },
            "task": "postComment"
        },
        "type": "Action.Submit",
        "title": "Comment"
    }

Clicking the button would bring in another adaptive card which I can submit back to my bot.

{
    "version": "1.2",
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "body": [
        {
            "type": "Input.Text",
            "id": "subject",
            "placeholder": "Subject"
        },
        {
            "type": "Input.Text",
            "id": "commentText",
            "isMultiLine": "true",
            "placeholder": "Enter Comment"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Post",
            "data": {
                "task": "replyToComment"
            }
        }
    ]
}

All of this works for me when I select the card from messaging extension and send to another user or channel. I can open the task module (popup) and submit the resulting form back to my bot.

If my colleague sends the same card to me and I click on this task module button, teams crashes with an overlay and a line. I inspected teams on web and see the following content in developer tools about app install consent elements which seems to be some dialog prompting the other user(me in this case) to install the app.

App install consent dialog-developer-tools

Can anyone help me in understanding what I might be missing. Any help is highly appreciated.

To answer my own question.

This problem occurs if we have side-loaded the app in teams and generate content from it to send to another person, a group or a channel Ex - Selecting an item from a Messaging extension and sending it to a colleague

When another person tries to click on the buttons of the card, teams prompts the other person to install the app onto their teams. Since, the app is sideloaded and teams can't find the app published either in organizational catalog or global catalog, it displays an empty modal.

I got my app published in our org catalog and this problem went away. My colleague was prompted to install the app when he clicked on the button.

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