microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.44k forks source link

Telegram: Title in Hero Card not bolded #4194

Closed tiloc closed 6 years ago

tiloc commented 6 years ago

Bot Info

Issue Description

When I set the Title property of a HeroCard to a string, then most channels (e.g. Webchat and Facebook) will bold it. Telegram will not. I think Telegram is technically capable of bolding text.

Code Example

Reproduction Steps

Expected Behavior

Title of the HeroCard is displayed in bold on Telegram channel.

Actual Results

Title of HeroCard on Telegram channel appears just as any other text (non-bold).

JasonSowers commented 6 years ago

Could you please share the code you are trying to use

JasonSowers commented 6 years ago

Looking into this deeper it seems telegram is not capable of this on desktop and IOS yet but they are working on implementing it on desktop according to this issue on their repo https://github.com/telegramdesktop/tdesktop/issues/2847 it seems it is only available in alpha version 1.1.11 at this point.

Alpha 1.1.11.

Send bold and italic text in your messages (in addition to already supported monospace and multiline monospace).

tiloc commented 6 years ago

Hi @JasonSowers the issue you are referring to on the telegram issue tracker is specifically for the ability for humans to enter bold text through markdown. It is actually making several references to making bold possible without bots. I have screenshots I took from my bot running on Telegram using QnaMaker where it is outputting bold text, but not when I am setting the Title property on a HeroCard. Sorry I cannot submit the Screenshots or my code tonight, I only have access to my personal phone right now.

tiloc commented 6 years ago

@JasonSowers I am attaching two screenshots from Telegram. One where you can see a bold title (based on a formatted answer from QnaMakerDialog). The other one showing the HeroCard with the non-bold title. The string "Anatomy of the Heart" is the Title attribute of the card. The following text is the Text attribute.


                Activity reply = ((Activity)context.Activity).CreateReply();

                var card = new HeroCard()
                {
                    Title = "Anatomy of the Heart",
                    Text = "Lore ipsum blurb...",
                };
                reply.Attachments.Add(card.ToAttachment());
                await context.PostAsync(reply);

telegram_with_bold_title telegram_with_non-bold_title

JasonSowers commented 6 years ago

I'm able to reproduce this, but no indications yet as to why this behavior is different between QnA and non-QnA. Still digging into this. It doesn't even work when manually adding the markdown 👎

tiloc commented 6 years ago

FWIW, here is the marked-up text from QnaMaker: \n\n# Symptoms of heart failure \n\n\n\nHeart failure symptoms can vary widely from person to person,

JasonSowers commented 6 years ago

I even tried markup on the hero card and couldn't get the bolded text on telegram desktop

fanidamj-zz commented 6 years ago

Closing the issue assuming it as resolved. Please reopen a new issue if it still persists.