MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
282 stars 504 forks source link

Text sent with Adaptive Card Carousel not shown on Mobile Teams Clients #4539

Open JordyGit opened 2 years ago

JordyGit commented 2 years ago

Hi,

Today I noticed that a sent message with an Adaptive card as attachment (carousel in this case), but who also includes text in the Text field (not attachment) doesn't display the text in the mobile Teams client, but does in the Teams Desktop client.

Teams Desktop Client: image

Teams Mobile Client (IOS): MicrosoftTeams-image (9)

ghost commented 2 years ago

Hi JordyGit! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Meghana-MSFT commented 2 years ago

@JordyGit - Could you please share your adaptive card JSON payload?

JordyGit commented 2 years ago

Hi,

I have some more information: This is only for IOS devices. Just tested it with an android device and there is does work correctly like the Teams Desktop client does.

Here is full message json I copied from the Bot Emulator which includes the text and attachement: { "type": "message", "serviceUrl": "https://9e7a-194-78-124-243.ngrok.io", "channelId": "emulator", "from": { "id": "b6c63a20-406d-11ec-815d-ad41c66a9f38", "name": "Bot", "role": "bot" }, "conversation": { "id": "a64eb4f0-415e-11ec-815d-ad41c66a9f38|livechat" }, "recipient": { "id": "d8584435-23d4-4c41-acfb-c29a45d49fcd", "role": "user" }, "attachmentLayout": "carousel", "locale": "en-US", "text": "I've listed the first 10 found elements below. Try to be more specific or view all your elements with [Remote Access](https://escape-bot.local.dataminer.services:3001/monitoring/view/-1/elements).", "inputHint": "acceptingInput", "attachments": [ { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element AMS_IRD02" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Active.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Major" }, { "title": "Alarms:", "value": "1" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/1" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "1", "DataMinerId": "3", "ElementName": "AMS_IRD02" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "2" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/2" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "2", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "3" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/3" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "3", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "4" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/4" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "4", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "5" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/5" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "5", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "6" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/6" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "6", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "7" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/7" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "7", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "8" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/8" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "8", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "9" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/9" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "9", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } }, { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Element TOR-6 Uplink Power Control" }, { "type": "TextBlock", "spacing": "None", "text": "The element is Paused.", "isSubtle": true, "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Alarm Level:", "value": "Normal" }, { "title": "Alarms:", "value": "10" } ] } ], "actions": [ { "type": "Action.OpenUrl", "title": "Open", "url": "https://escape-bot.local.dataminer.services:3001/monitoring/element/3/10" }, { "type": "Action.Submit", "title": "Alarms", "data": { "CustomActionId": "GetAlarmsForElementId", "ElementId": "10", "DataMinerId": "3", "ElementName": "TOR-6 Uplink Power Control" } } ], "msteams": { "width": "Full" }, "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" } } ], "entities": [], "replyToId": "d0cb0f70-415f-11ec-9ca9-67404865d900", "id": "d40a5bf0-415f-11ec-9ca9-67404865d900", "localTimestamp": "2021-11-09T14:20:37+01:00", "timestamp": "2021-11-09T13:20:37.679Z" }

Meghana-MSFT commented 2 years ago

@JordyGit - We are also able to repro this issue. We are checking this internally and will update you.

JordyGit commented 2 years ago

Thanks!

I’ve also found that for example a URL in that text doesn’t work on Desktop client. It renders like a URL and seems to be clickable but it is not (it is working fine on Android, IOS the text doesn’t appear so not possible to check this yet). When clicking on the URL nothing happens.

Any url like this in the text field if also sending a adaptive card carousel: [url text](https://google.com)

As a temporary workaround we’ve just changed to send two messages at once, first the text, then the carousel adaptive card. That way it works fine on all clients (text visible and url clickable).

Meghana-MSFT commented 2 years ago

We have raised a bug for the text issue and the engineering team will look into it. Could you please help by raising the URL issue as a separate question.

Thank you

Meghana-MSFT commented 2 years ago

@JordyGit - The fix is available publicly. We have verified the fix and its working fine.