Rocket.chat: Disable link preview when message is send by a bot

Created on 11 Jan 2017  路  7Comments  路  Source: RocketChat/Rocket.Chat

Your Rocket.Chat version: 0.48.2

Hi,

Is there an equivalent to the Slack attributes unfurl_link and unfurl_media? On slack, unfurl_link is False by default, so when a bot post a link, Slack doesn't try to display a preview.

Or is there any way to simply post a link with a bot without having Rocket Chat displaying a preview?

Thanks

embed support

Most helpful comment

@maethor have you tried to add the bot username in Disable Embed for Users setting in administration->Message?
screenshot from 2017-01-11 12-54-24

All 7 comments

By the way, if anyone is looking for a way to disable preview on a message send by a bot, I found a (quite ugly) workaround. Previews are auto-attachments. So if you put an attachment, or even if you force "attachments": [{}], preview will not show up.

But I think it would really be better to add unfurl_link and unfurl_media variables :smile:

@maethor have you tried to add the bot username in Disable Embed for Users setting in administration->Message?
screenshot from 2017-01-11 12-54-24

I didn't. I prefer a way that don't completely forbid it (because the same bot is used by hubot to display pictures).

But you are right, it is always possible to make two bot account, one allowed to embed preview, and another who is not. With that said, I still prefer my "attachments" :)

If you don't think it would be usefull to implement unfurl_media and unfurl_links, you can close this issue. I least someone looking for it will find two workarounds :smile:

@MartinSchoeler where can I find this option exactly? I'm trying to disable previews for messages sent by the RSS app, but to no avail so far.

Oh nevermind, google failed on me :D

Seems it's available now by disable_web_page_preview parameter:

https://core.telegram.org/bots/api#editmessagetext

As, told by ttodua ,you need to pass, disable_web_page_preview=True argument

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kiran-Rao picture Kiran-Rao  路  3Comments

mattlin picture mattlin  路  3Comments

ghost picture ghost  路  3Comments

mddvul22 picture mddvul22  路  3Comments

Buzzele picture Buzzele  路  3Comments