Forum Discussion

MaribalCor's avatar
MaribalCor
Copper Contributor
Feb 09, 2022

Bug: Adaptive card does not works on Microsoft Teams's mobile app

Hello,

 

We got a problem with adaptive card, we are using an Action.Submit button where it invoke a message request for our bot, this works fine on web but on mobile does not works, button keep on feedback and does not do any request.

 

This is our JSON:

 

{
            contentType:'application/vnd.microsoft.card.adaptive',
            content: {
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "version": "1.3",
                "body": [
                    {
                        "type": "ColumnSet",
                        "columns": [
                            {
                                "type": "Column",
                                "items": [
                                    {
                                        "type": "Image",
                                        "url": `https://digital-assets.projectcor.com/integrations/${statusUrl}-d-50.png`,
                                        "spacing": "None"
                                    }
                                ],
                                "width": "50px"
                            },
                            {
                                "type": "Column",
                                "items": [
                                    {
                                        "type": "TextBlock",
                                        "isSubtle": true,
                                        "text": `${companyName} > ${chipName}`,
                                        "color": "Dark",
                                        "wrap": true
                                    },
                                    {
                                        "type": "TextBlock",
                                        "spacing": "None",
                                        "text": task.title,
                                        "color": "Dark",
                                        "size": "ExtraLarge",
                                        "weight": "Bolder",
                                        "wrap": true
                                    },
                                    {
                                        "type": "TextBlock",
                                        "isSubtle": true,
                                        "text": `${lang.priority}: ${utils.getPriorityName(task.priority,locale)}`,
                                        "color": "Dark",
                                        "wrap": true
                                    },
                                ],
                                "width": "stretch"
                            }
                        ]
                    },
                    {
                        "type": "ColumnSet",
                        "separator": true,
                        "spacing": "Medium",
                        "columns": [
                            {
                                "type": "Column",
                                "items": [
                                    {
                                        "type": "ColumnSet",
                                        "columns": [
                                            {
                                                "type": "Column",
                                                "items": [
                                                    {
                                                        "type": "Image",
                                                        "url": "https://digital-assets.projectcor.com/integrations/deadline-2.png"
                                                    }
                                                ],
                                                "width": "25px"
                                            },
                                            {
                                                "type": "Column",
                                                "items": [
                                                    {
                                                        "type": "TextBlock",
                                                        "text": "Deadline",
                                                        "color": "Dark",
                                                        "weight": "Bolder",
                                                        "wrap": true
                                                    },
                                                    {
                                                        "type": "TextBlock",
                                                        "text": `${date ? date  : 'No date'}`,

                                                        "color": "Dark",
                                                        "wrap": true
                                                    }
                                                ],
                                                "width": "110px"
                                            },
                                            {
                                                "type": "Column",
                                                "items": [
                                                    {
                                                        "type": "Image",
                                                        "url": "https://digital-assets.projectcor.com/integrations/usr.png"
                                                    }
                                                ],
                                                "width": "25px"
                                            },
                                            {
                                                "type": "Column",
                                                "items": [
                                                    {
                                                        "type": "TextBlock",
                                                        "text": "Project manager",
                                                        "color": "Dark",
                                                        "spacing": "Large",
                                                        "weight": "Bolder",
                                                        "wrap": true
                                                    },
                                                    {
                                                        "type": "TextBlock",
                                                        "text": `${taskPm ? taskPm : 'No project manager'}`,
                                                        "color": "Dark",
                                                        "wrap": true
                                                    }
                                                ],
                                                "width": "180px"
                                            }
                                        ]
                                    }
                                ],
                                "width": "stretch"
                            }
                        ]
                    },
                    {
                        "type": "ColumnSet",
                        "spacing": "Medium",
                        "columns": [
                            {
                                "type": "Column",
                                "items": [
                                    {
                                        "type": "Image",
                                        "url": "https://digital-assets.projectcor.com/integrations/usr.png"
                                    }
                                ],
                                "width": "25px"
                            },
                            {
                                "type": "Column",
                                "items": [
                                    {
                                        "type": "TextBlock",
                                        "text": lang.collaborators,
                                        "color": "Dark",
                                        "spacing": "Large",
                                        "weight": "Bolder",
                                        "wrap": true
                                    },
                                    {
                                        "type": "RichTextBlock",
                                        "inlines": [
                                            {
                                                "type": "TextRun",
                                                "text": utils.collaboratorsArray(task.collaborators)
                                            }
                                        ],
                                        "spacing": "Small",
                                        "height": "stretch",
                                    }
                                ],
                                "width": "300px"
                            }
                        ],
                        "separator": true
                    },
                    {
                        "type": "ActionSet",
                        "actions": [
                            {
                                "type": "Action.Submit",
                                "title": lang.comment,
                                "data": {
                                    "msteams": {
                                        "type": "invoke",
                                        "value": {
                                            "type": "task/fetch",
                                            "action": "createComment",
                                            "route": `tasks/${task.id}`
                                        }
                                    }
                                },
                                "style": "positive"
                            },
                            {
                                "type": "Action.OpenUrl",
                                "title": lang.view_cor,
                                "url": `https://${subdomain}.${utils.getWebUrl()}/tasks/${task.id}`
                            }],
                            "separator": true,
                            "height": "stretch",
                            "spacing": "Medium",
                            "horizontalAlignment": "Center"
                        }
                ],

            }

 

Comment button of invoke type and action createComment has the issue.

 

Thanks!

Resources