matrix-spec-proposals icon indicating copy to clipboard operation
matrix-spec-proposals copied to clipboard

MSC2385: Disable URL Previews, alternative method

Open Sorunome opened this issue 6 years ago • 14 comments

Rendered

This MSC provides an alternative method to MSC2376

Shepherd: @anoadragon453

Signed-off-by: Sorunome [email protected]

Sorunome avatar Dec 08 '19 15:12 Sorunome

Other potential issue: naughty clients could add some urls in url_previews that are not in the message, resulting in URL preview displaying bad content not related to the message. Why not having just a list of booleans to avoid repeating the url in the message?

bmarty avatar Dec 09 '19 13:12 bmarty

Other potential issue: naughty clients could add some urls in url_previews that are not in the message, resulting in URL preview displaying bad content not related to the message. Why not having just a list of booleans to avoid repeating the url in the message?

Further on, please comment on a specific line of text so that discussions could be tracked more easily. As per your concern - as far as I see, the MSC states that URLs in url_previews must be exactly the URLs in the message body, so a boolean would be superfluous.

KitsuneRal avatar Dec 09 '19 15:12 KitsuneRal

Other potential issue: naughty clients could add some urls in url_previews that are not in the message, resulting in URL preview displaying bad content not related to the message. Why not having just a list of booleans to avoid repeating the url in the message?

As stated in the MSC, url_previews is basically a whitelist, not a list of URLs to do previews for. So you still do URL previews like currently but additionally check if it is present in url_previews (if present). Thus additional URLs in that list would be just ignored.

Sorunome avatar Dec 09 '19 16:12 Sorunome

Honestly I kinda like the potential to hint clients to render "previews" for links not present in the message.

I believe facebook does this, where you can paste in a link, get a preview, remove the link and then just comment on the link being shared.

essentially turning the preview into more of a "rich link" part of the message.

D4ndellion avatar Dec 09 '19 23:12 D4ndellion

the MSC states that URLs in url_previews must be exactly the URLs in the message body

Yes, but what if it's not the case?

Anyway, maybe the pb is to avoid rendering useless url preview in the timeline, so maybe the solution is to stop displaying url preview in the timeline and display the preview in a popup when the link is hovered or when the link is clicked (the same way Google docs do it for instance).

bmarty avatar Dec 10 '19 00:12 bmarty

the MSC states that URLs in url_previews must be exactly the URLs in the message body

Yes, but what if it's not the case?

It is supposed to be ignored, as stated in the MSC

If a URL is present in this key that is not present in the body clients SHOULD NOT render a preview for that URL.

Sorunome avatar Dec 10 '19 10:12 Sorunome

Honestly I kinda like the potential to hint clients to render "previews" for links not present in the message.

I believe facebook does this, where you can paste in a link, get a preview, remove the link and then just comment on the link being shared.

essentially turning the preview into more of a "rich link" part of the message.

I would absolutely prefer such behaviour to be in a separate MSC. Matrix operates in a very different realm than Facebook; I could imagine such behaviour as somewhat natural in Mastodon but not in Matrix.

KitsuneRal avatar Dec 10 '19 17:12 KitsuneRal

Honestly I kinda like the potential to hint clients to render "previews" for links not present in the message. I believe facebook does this, where you can paste in a link, get a preview, remove the link and then just comment on the link being shared. essentially turning the preview into more of a "rich link" part of the message.

I would absolutely prefer such behaviour to be in a separate MSC. Matrix operates in a very different realm than Facebook; I could imagine such behaviour as somewhat natural in Mastodon but not in Matrix.

rich-links

D4ndellion avatar Dec 10 '19 19:12 D4ndellion

This could help with clients exempting urls from the array by (for example) surrounding those urls with <>, on other clients, this disables that preview.

ShadowJonathan avatar Mar 23 '21 11:03 ShadowJonathan

I was going to open issue about this then I found this MSC! Thanks for good ideas guys ;)

JuniorJPDJ avatar Sep 16 '21 00:09 JuniorJPDJ

@Sorunome hello! If you don't have the time to respond to feedback on this MSC, you be willing to allow me to shepherd it?

anoadragon453 avatar Nov 30 '21 16:11 anoadragon453

This was added to the "Needs idea feedback" column on the SCT backlog board as I thought it could use a more recent review from a SCT member.

But in hindsight, this is mostly ready, and is just blocked on closing the existing threads of discussion.

So... taking off the board again until that's done.

anoadragon453 avatar Nov 30 '21 17:11 anoadragon453

If you don't have the time to respond to feedback on this MSC, you be willing to allow me to shepherd it?

I have received a "yes" out of band.

anoadragon453 avatar Nov 30 '21 18:11 anoadragon453

https://github.com/matrix-org/matrix-spec-proposals/pull/4095 is an alternative for this, with the extra functionality of being able to bundle preview data (the bundling isn't mandatory though)

tulir avatar Jan 31 '24 21:01 tulir