Adaptive card sent by bot builder framework only shows "Sent a card" as the message, in iPhone #11726
Labels
needs-triage 🔍
teams-developer-support
Question related to extensibility (Bot, ME, Tab) would be marked under this label
Steps to reproduce
Copied from: microsoft/botbuilder-dotnet#6774
Posted by: @hussain-nz
Details:
Version: 4.11.1.0
Describe the bug
When sending an Adaptive card via bot builder framework, it only shows "Sent a card" as the message, in iPhone. The bug seems to be caused by the ampersand character &. See screenshot below in "Screenshot" section.
To Reproduce
Steps to reproduce the behavior:
Bot message should be sent in the context of a custom Teams app, and will appear inside Chat/Activity tab of the custom Teams app. Code instructions below:
Create "Activity" object.
Populate ServiceUrl, Type, Summary.
Populate Attachments with HeroCard. HeroCard "Message" property should have ampersand character &.
Send Activity via turnContext.SendActivityAsync()
Open the Teams bot message inside an iPhone (Chat/Activity tab of the custom Teams app).
Code below in "Additional Context" section.
Additional context
Code to reproduce the issue:
` public async Task Send(ITurnContext turnContext, string messageText, CancellationToken cancellationToken = default)
{
if (!turnContext.Activity.IsTeamsBot())
{
throw new BotException($"{turnContext.Activity.ChannelId} channel is not supported for this kind of bot messages.");
}
Expected behavior
MessageText should be shown correctly on iPhone (instead of "Sent a card"). It's working correctly on Android and PC.
Actual behavior
Not working in iOS device.
Error details
Screenshot below that shows a working message on Android (left side) and incorrect message for iPhone (right side).
image
The text was updated successfully, but these errors were encountered: