简体   繁体   English

带有自适应卡的团队任务模块不会为其他用户打开并导致团队崩溃

[英]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).我正在使用 Bot 框架 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.机器人不是对话的参与者 - 频道、群聊、与其他用户的 1-1。

I added a Action.Submit button on the adaptive card to fetch a task module (popup) on this card as below.我在自适应卡上添加了一个Action.Submit按钮以获取该卡上的任务模块(弹出窗口),如下所示。

{
        "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.我检查了 web 上的团队,并在开发人员工具中看到了有关应用安装同意元素的以下内容,这似乎是一些提示其他用户(在这种情况下是我)安装应用的对话框。

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.我的同事在点击按钮时被提示安装该应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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