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

permalink_prefix for self-hosted matrix.to instances #23933

Closed
a-0-dev opened this issue Dec 7, 2022 · 7 comments
Closed

permalink_prefix for self-hosted matrix.to instances #23933

a-0-dev opened this issue Dec 7, 2022 · 7 comments
Labels
A-Config A-Matrix.to T-Enhancement X-Needs-Info This issue is blocked awaiting information from the reporter X-Needs-Product More input needed from the Product team

Comments

@a-0-dev
Copy link

a-0-dev commented Dec 7, 2022

Your use case

TL;DR: support self-hosted matrix.to instances as permalink_prefix.

Explanation:
The element web customization documentation (no. 4) explains that permalink_prefix can be used to replace the matrix.to in share links with a different domain where some element web instance is located.

However, since it replaces matrix.to and not app.element.io, I would expect it would also work with self-hosted matrix.to instances. The URL path that is appended to permalink_prefix only works with element web though.

Comparison:

  1. no permalink_prefix set: https://matrix.to/#/#room:example.com (working)
  2. permalink_prefix set to an element web instance: https://my.element.web/#/room/#room:example.com (working)
  3. permalink_prefix set to a self-hosted matrix.to: https://to.my.matrix.com/#/room/#room:example.com (not working - matrix.to requires the URL path scheme shown in 1)

I can imagine this is intended since many host element web and few their own matrix.to, but since matrix.to is not only handy but sometimes required it would be great if element would support it in one way or the other.

Potential solutions:

  1. Auto-discover whether there's element web or matrix.to behind permalink_prefix
  2. different config options (permalink_prefix or matrix_to_prefix for backwards compatibility)
  3. (same path scheme for matrix.to and element web - not reasonable)
  4. ...?

Have you considered any alternatives?

currently, we use our self-hosted element web as prefix, but it hurts all users using desktop/mobile clients.

Additional context

No response

@t3chguy t3chguy added the X-Needs-Product More input needed from the Product team label Dec 7, 2022
@turt2live
Copy link
Member

Note that matrix.to is not intended to be much different than the matrix: URI scheme, meaning a "custom instance" isn't technically a real thing.

matrix.to can be used in closed/private federations, even without connecting matrix.org (or its infrastructure) to your network.

I'm curious as to what your usecase is for self-hosting matrix.to though, as regardless of Product team input this doesn't look like something we'd be able to implement (safely) at a technical level, due to limitations within the spec.

@turt2live turt2live added X-Needs-Info This issue is blocked awaiting information from the reporter A-Matrix.to A-Config labels Dec 7, 2022
@a-0-dev
Copy link
Author

a-0-dev commented Dec 8, 2022

I know, if the matrix:// URI scheme would be handled by most software (and e.g. rendered as clickable link) this wouldn't be an issue at all. Very much looking forward to that!

Our use case is that our institution is slowly adopting matrix as main chat/comms system, and people are using different clients. Still, if the room is e.g. mentioned in an invite e-mail for a meeting, you want to cater for all needs - those on our own element web, those with their own client and those who still need assistance for their first matrix login.

So matrix.to is definitely the way to go, but since some have data protection and security concerns ("clicking on a foreigh-domain link in an e-mail") we set up our own instance of matrix.to. I know it's designed to not leak the room name etc. to the hoster, but having it on our own domain still makes people trust it more, which is something we care about.

What issues would the matrix spec pose to implementing this share link feature for both element web and matrix.to instances? At least with option 2 from my original post I'm not sure whether the spec is concerned at all 🤔

@turt2live
Copy link
Member

The spec says matrix.to URIs are for routing only, not to be assumed as a functional web server. In practice this means there's not really such a thing as a "custom matrix.to instance", but rather an onboarding service which is adjacent to the client. It's a similar request to supporting a custom scheme (mycompany:// for example), which is where the technical side gets questionable.

@a-0-dev
Copy link
Author

a-0-dev commented Dec 9, 2022

Sure, but especially when those "invite links" are shared via email, we cannot assume the e-mail client will handle matrix.to links in any special way - it will just open them in a browser. And if you already reached the point in an institution that users do not just click on links in e-mails with unknown and/or sketchy domains (and *.to would probably generally be considered sketchy) you don't really want to give that up...

So it would definitely make things easier for us if creating "self-hosted matrix.to links" in the Element UI was possible.

@turt2live
Copy link
Member

The intention for that usecase is to use Element Web links instead, as implied by permalinkPrefix existing 😇

Element has published custom mobile apps before to support this sort of stuff, though it goes through the sales channels rather than free support like here, if it helps.

@a-0-dev
Copy link
Author

a-0-dev commented Dec 9, 2022

I see, we'll consider using an element web prefix then and maybe leaving our "self-hosted matrix.to" for manually generating share links on that site if someone requires that.

Thank you very much for your time and effort!

@a-0-dev a-0-dev closed this as completed Dec 9, 2022
@MadLittleMods
Copy link
Contributor

Related to #23960

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Config A-Matrix.to T-Enhancement X-Needs-Info This issue is blocked awaiting information from the reporter X-Needs-Product More input needed from the Product team
Projects
None yet
Development

No branches or pull requests

4 participants