Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram bot api: sendPhoto do not render html

Tags:

telegram-bot

I'm composing messages in this way

const reply_telegram = {
        "chat_id"               : MIRKO,
        "photo"                 : row.image_url,
        "caption"               : '<b>Wow</b>',
        "parse_mode"            : "HTML",
        "disable_notification"  : true,
}

For the goal of this question, focalize on

"parse_mode" : "HTML"

I am usng the sendPhoto instead of classic sendMessage.

  1. Official docs state that I can use a caption and parse_mode in the sendPhoto method
  2. I am actively using sendMessage with html content, and it's handled as HTML as I want

In short, the problem is that: message is sent, photo is delivered, caption text is printed under the photo, tags are not printed, but the title is not bold as I requested.

What am I missing?

like image 832
realtebo Avatar asked May 03 '26 10:05

realtebo


1 Answers

Actually, July of 2019, seems that the problem is no more present. Probably Twitter has fixed it.

like image 67
realtebo Avatar answered May 06 '26 10:05

realtebo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!