botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Bug] Bot framework in C# does not respect activity.TextFormat on certain channels

Open DrWala opened this issue 10 years ago • 7 comments

I've set activity.TextFormat to be "plain", however the formatting is not respected in Slack and Telegram. However, The bot framework emulator does respect it. The text in the activity looks like this:

Something

However, even with TextFormat set to plain, the words are bolded on Telegram, and Slack displays it as # Something #.

Do let me know what other screenshots I need to provide to assist in investigating this. I'm using the C# SDK, with BotFramework v3

Screenshots: Telegram text response that is bolded despite TextFormat being plain Telegram text response that is bolded despite TextFormat being plain (Incorrect)

Slack response that surrounds text with '#' despite TextFormat being plain Slack response that surrounds text with '#' despite TextFormat being plain (Incorrect)

Bot framework emulator response that is not formatted when TextFormat is plain Bot framework emulator response that is not formatted when TextFormat is plain (Correct)

DrWala avatar Sep 02 '16 07:09 DrWala

Hi, any update?

DrWala avatar Sep 13 '16 06:09 DrWala

Hi @DrWala, apologies for the delay. Before we make a fix I'd like to understand a little better what you think correct behavior should be here. Would you expect markdown to be stripped from the message? Or, would markdown formatting remain, and be treated as plaintext? I'm guessing the latter.

eanders-ms avatar Sep 14 '16 05:09 eanders-ms

@DrWala A fix has been made for Telegram. We've taken a TODO to update Slack, but do not have a timeline for this yet. This fix will be available in the next production update. Production updates typically happen about once a week.

eanders-ms avatar Sep 15 '16 23:09 eanders-ms

The extra # at end of the line is being added by Slack, not by the Bot Framework.

LarsLiden avatar Oct 04 '16 20:10 LarsLiden

I am receiving text from QnA service which is post back to user as below in webchannel as below using c#.

string qnaResponse ="Office 365 Service. \n\nThe email migration"; var answer = context.MakeMessage(); answer.TextFormat = "markdown"; answer.Text = $"{qnaResponset}}"; context.PostAsync(answer);

\n\n is not interpreted as new paragraph. same thing happen if I pass same string as text in a hero card. can anyone help me understand how can i get it resolved?

cwatch09 avatar Aug 02 '17 13:08 cwatch09

We rolled out a fix for this. Please verify.

pchoudhari avatar Aug 07 '17 04:08 pchoudhari

@poojashivach You are commenting on a closed issue.

If you have a question or problem, please open a new issue.

nwhitmont avatar Aug 08 '17 01:08 nwhitmont