-
Notifications
You must be signed in to change notification settings - Fork 732
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 not working for e2e rooms, even with previews enabled #2555
Comments
I randomly selected this bug as a potential good "first issue" to familiarize myself with the codebase, but it turns out it's a bit more complicated :-) Element-Android's current behavior is pretty straight-forward, it simply disables URL previews for all encrypted rooms: https://github.com/vector-im/element-android/pull/2490/files#diff-777e743c40b267f7ad514207dabaf444be1b227ad415e31d86bf798ea3aac2f0R1353. That would have to be replaced with a per-room setting (https://matrix.org/docs/spec/client_server/latest#put-matrix-client-r0-user-userid-rooms-roomid-account-data-type). However, Element-Web currently uses two different setting keys, one if the room is encrypted, another if the room is not encrypted. Non-encrypted rooms use "org.matrix.room.preview_urls", a key in the official namespace but missing from the spec (https://github.com/matrix-org/matrix-doc/issues/1732) and referred to as "legacy" by comments in the codebase. But for encrypted rooms it uses a dict with key "im.vector.web.settings", containing a setting called "urlPreviewsEnabled_e2ee". Making Element-Android read from/write to the "im.vector.web" namespace would (although theoretically possible) not be the right way to go. Making it use its own namespace, "im.vector.android", would be possible but then the setting wouldn't be synchronized between Android and Web, also not ideal. So the right way to tackle this probably involves first creating a formal spec for this setting, then (re-)writing both Element-Web and Element-Android to make use of it. (Although then you could argue whether room accountdata is even the right place for this setting; f.e. someone who trusts their homeserver - because it's ran by themselves or their organization - would probably rather enable e2e URL previews for all rooms with a single setting). |
Hi! I'm having this issue with e2e rooms for Android; absolutely no way to make URL previews work. Have there been any updates on getting this fixed? |
Hi! I also have this issue. No URL previews for encrypted rooms/chats. But I found an option for the windows client in the room options: "URL-Vorschau für dich in diesem Raum" (German, which probably translates back into the English original like "URL previews for you in this room"). So every participant of this room can/must enable this if URL previews are wanted. I tried and it worked! Unfortunately I do not see this option for the Android and iOS client. For Linux I cannot say as I do not have a Linux machine with a GUI here at the moment. I googled and read about this option and also if it should be enabled in encrypted rooms. And I noticed that this topic is there for quite a while. So I was not sure if this was the case by purpose (security by design) or not. But after noticing the option in the Windows client I would say that URL previews in encrypted rooms are supported - if enabled by the user. So my question here is, if the option will be ported to Android and iOS (and maybe Linux), too? |
Describe the bug
With the introduction of url previews in 1.0.12, we now have parity with Element web, except for e2e rooms. I'm a member of a large number of e2e rooms with URL previews enabled (in element web) that are not expanding in element android.
(This used to work with the old version of riot-android, fwiw.)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I was expecting a preview. :)
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: