Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL previews! #888

Closed
ara4n opened this issue Dec 23, 2016 · 23 comments · Fixed by #4790
Closed

URL previews! #888

ara4n opened this issue Dec 23, 2016 · 23 comments · Fixed by #4790
Assignees

Comments

@ara4n
Copy link
Member

ara4n commented Dec 23, 2016

Figma link: https://www.figma.com/file/tnv1s5KUVK38Byt54gs7GM/%5BTimeline%5D-URL-previews?node-id=8%3A122

@ara4n ara4n added the feature label Dec 23, 2016
@ara4n
Copy link
Member Author

ara4n commented Oct 29, 2017

Display inline previews for URLs in timeline (for parity with riot-web), using the API as per https://github.com/matrix-org/synapse/blob/develop/docs/url_previews.md#api

@aaronraimist
Copy link
Contributor

Could be considered a dup of #826 but since this one has the thumbs up, probably just close that one (and #1893)

@jacotec
Copy link

jacotec commented Feb 3, 2019

Is there any movement in the implementation of the URL previews to get par to Riot Web and Riot Android?

@Zjemm
Copy link

Zjemm commented Feb 21, 2019

yes url previews for IOS would make it a lot nicer

@manuroe manuroe modified the milestones: Sprint 19, Sprint 20 Mar 11, 2019
@gigajosh
Copy link

Is there a way to see what Sprint the team is currently on and what milestones are included?

@jacotec
Copy link

jacotec commented Sep 26, 2019

+1, I'm waiting for that over a year, telling my users it'll come. I don't know where's the problem to just implement it ...

@jacotec
Copy link

jacotec commented Apr 12, 2020

Another half of a year passed ... and nothing happened ☹️

@manuroe manuroe modified the milestones: Sprint 20, Developer Bucket Jun 26, 2020
@hundehausen
Copy link

still waiting for this feature

@wyrdthud
Copy link

My users are also waiting eagerly for this feature.

@submarine89
Copy link

With Signal inviting extra scrutiny, and being a centralized product, the whining I get from my fellow chatters I've asked to convert to Element centers around the lack of URL previews. This request has been around for a while and is just a parity request. So, for now, I am also eagerly awaiting this feature.

@manuroe manuroe added the Z-Papercuts Visible. Impactful. Predictable to action. label Jun 25, 2021
@pixlwave pixlwave self-assigned this Jul 15, 2021
@pixlwave
Copy link
Member

For iOS 13 and higher we can look at using https://developer.apple.com/documentation/linkpresentation for the system to manage these previews, with a fall back to a custom implementation for anyone running 11 & 12.

@ShadowJonathan
Copy link
Contributor

ShadowJonathan commented Jul 20, 2021

developer.apple.com/documentation/linkpresentation

Wouldn't this break parity with the other Element clients? Not (only) in the way of presentation, but also with generation? As synapse has it's own quirks when displaying links, and the iOS method will share none of that.

@pixlwave
Copy link
Member

There is some customisation to how it appears and it's possible to provide it with custom data from Synapse if necessary. But if it ultimately doesn't fit, it won't have been much work and the fall back will be there anyway 🙂

@aaronraimist
Copy link
Contributor

aaronraimist commented Jul 20, 2021

I like the idea of using the system API from a visual standpoint but does using that API mean the preview would be fetched locally on device rather than by the server? That would be a privacy issue.

@ShadowJonathan
Copy link
Contributor

I expect Apple to keep user privacy in mind, they'd probably do this feature by bouncing these requests through their servers, or do something alike to that (or cache the results). So I think privacy is not the issue here, if i'm not mistaken.

@aaronraimist
Copy link
Contributor

aaronraimist commented Jul 21, 2021

@ShadowJonathan possibly on iOS 15 with iCloud Private Relay but iOS 14 definitely fetches the previews that are shown in the Messages app directly from your phone (just tested)

@submarine89
Copy link

How are other apps providing a preview and maintaining privacy?

@pixlwave
Copy link
Member

pixlwave commented Jul 21, 2021

does using that API mean the preview would be fetched locally on device rather than by the server

It can be done either way. We can get the data ourselves and provide it to the view, or can give the view the URL and let it handle this on device. In both instances I believe the data is taken from opengraph tags in the page.

How are other apps providing a preview and maintaining privacy?

Currently they call /_matrix/media/r0/preview_url?url=http://wherever.com on the homeserver. This is discouraged when in encrypted rooms, as it leaks message contents to the server in plain text. Element-web lets the user enable that on a room by room basis.

@manuroe manuroe added the X-Needs-Design May require input from the design team label Aug 10, 2021
@niquewoodhouse
Copy link

Light@2x

Dark@2x

I took a look at Android and copied all their content elements (title, body, image, domain) just in a different order.

@franc2s
Copy link

franc2s commented Dec 2, 2021

The URL previews dont work on urls that are written to a room by a bot (in my case the rss bot). I do get preloads for manually input urls. So, it doesnt work all of the time. I am on ios 15.1.1.

@ShadowJonathan
Copy link
Contributor

@franc2s could you maybe tap such a message, "More", "View Source", and then copy that into a new issue?

@franc2s
Copy link

franc2s commented Dec 3, 2021

Hi @ShadowJonathan

On the Element version 1.9.3 (Linux). URLs preload (same as on the latest Android client for Android 7).
{
"content": {
"body": "Road.cc RSS Feed: Van Rysel Merino Arm Warmers 900 ( https://road.cc/content/review/van-rysel-merino-arm-warmers-900-288325 )",
"format": "org.matrix.custom.html",
"formatted_body": "Road.cc RSS Feed:
<a href="https://road.cc/content/review/van-rysel-merino-arm-warmers-900-288325\">Van Rysel Merino Arm Warmers 900",
"msgtype": "m.notice"
},
"origin_server_ts": 1638549169403,
"sender": "@neb_rssbot=40XXXX=3amatrix.org:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 2650723
},
"event_id": "$ArU0sZzcI_XVGjli_a1aA4fnDnZ5BWwzNiMuPvuwj-8",
"room_id": "!XXXX:matrix.org"
}

On IOS 15.1.1, here the urls dont preload.
{
"sender" : "@neb_rssbot=40XXXX=3amatrix.org:matrix.org",
"content" : {
"body" : "Road.cc RSS Feed: Van Rysel Merino Arm Warmers 900 ( https://road.cc/content/review/van-rysel-merino-arm-warmers-900-288325 )",
"formatted_body" : "Road.cc RSS Feed</strong>:
<a href="https://road.cc/content/review/van-rysel-merino-arm-warmers-900-288325">Van Rysel Merino Arm Warmers 900</strong></a>",
"msgtype" : "m.notice",
"format" : "org.matrix.custom.html"
},
"origin_server_ts" : 1638549169403,
"room_id" : "!XXXX:matrix.org",
"event_id" : "$ArU0sZzcI_XVGjli_a1aA4fnDnZ5BWwzNiMuPvuwj-8",
"unsigned" : {
"age" : 46706
},
"type" : "m.room.message"
}

Thanks.

@ShadowJonathan
Copy link
Contributor

@franc2s could you please put that in a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.