Disable preview for a specific link in Telegram bot API

509 views Asked by At

Does anyone know if a bot sets the disable_web_page_preview: false in sendMessage method and sends a link as part of a message, can I somehow programmatically disable the preview for a this (one) link?

My task is to ensure that the link that the bot sends as part of the message is displayed without preview. But if an admin decides to manually edit a post and add a link, the added link should have a preview working. After updating Telegram, if disable_web_page_preview: false is specified, all links do not have a preview. Regardless of whether they were sent by a bot or added later by the channel administrator when editing the message. You cannot manually enable link previews through the application; you can only disable link previews. From my point of view, the latest Telegram update in this part was done poorly.

Tried disable_web_page_preview: true - all links do not have a preview. If false, the first link in the message sent by the bot has a preview. I don't need a preview for this specific link, and need preview for other links.

0

There are 0 answers