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

We need a way to discover custom permalink prefixes. #548

Open
ara4n opened this issue Oct 2, 2019 · 9 comments
Open

We need a way to discover custom permalink prefixes. #548

ara4n opened this issue Oct 2, 2019 · 9 comments
Labels
A-Client-Server Issues affecting the CS API enhancement A suggestion for a relatively simple improvement to the protocol

Comments

@ara4n
Copy link
Member

ara4n commented Oct 2, 2019

matrix-org/matrix-react-sdk#3500 is awesome, but currently relies on riot-web's config.json to find out what permalink prefix to use. this sucks for other clients (e.g. riot-ios or riot/android or others) which might connect to the server and need to know what prefix to intercept the links in-app.

We can't use matrix URLs for this given the use case for custom permalink prefixes is unfederated deployments, so instead we should specify a way via /info or similar to advertise the prefix that server recommends.

@KitsuneRal
Copy link
Member

KitsuneRal commented Oct 2, 2019

I think Matrix URLs would work here, had we a sort of "authority" part in them that would allow to explicitly specify the server from which a message is available. Something like https://matrix.to/#/unfederatedgateway.org/#unfederatedroom:unfederatedserver.org or, as already defined in my vapourware MSC, matrix://unfederatedgateway.org/room/unfederatedroom:unfederatedserver.org

@turt2live turt2live added A-Client-Server Issues affecting the CS API enhancement A suggestion for a relatively simple improvement to the protocol labels Oct 3, 2019
@ara4n
Copy link
Member Author

ara4n commented Oct 3, 2019

ooh, yes. how should the client know that "you must be directly connected to unfederatedgateway.org via CS API" for this to work though, versus "try to use this server to join the room over federation?"

@KitsuneRal
Copy link
Member

I guess we already use ?via= for the latter, and this is more about routing over federation which probably shouldn't use the URL authority part as the entry point in the first place.

@ara4n
Copy link
Member Author

ara4n commented Oct 5, 2019

so is the foo.com in matrix://foo.com/room the server your client is meant to be connected to, or the server your server is meant to connect to in order to join the room? the use case here is to define the server your client has to be connected to for the URI to work (for unfederated servers)

@KitsuneRal
Copy link
Member

Exactly, and that's what I say: we already use ?via= in order to tell servers which other servers to connect to; while the unfederatedgateway.org part in my examples points to the server that the client has to directly connect to, because their homeserver might not be federating with it.

@KitsuneRal
Copy link
Member

To illustrate: matrix:roomid/RoomId:example.org?via=example2.org or, respectively, https://matrix.to/#/!RoomIdh:example.org?via=example2.org tell that the client should pass example2.org to its "usual" homeserver so that the homeserver could join the room !RoomId:example.org and thereby make it available for the client. We already have this.

matrix://example2.org/roomid/RoomId:example.org or https://matrix.to/#/example2.org/!RoomId:example.org could tell that the client should discover the homeserver at the name example2.org (.well-known etc.) and connect to it directly (not via the "usual" homeserver) in order to join or peek the room !RoomId:example.org. An interesting question here is whether we should allow to specify multiple "authority" servers (mirroring the feature-richness of ?via=) - I consider this unnecessary because we talk about unfederated rooms/servers which I assume to be sort of centralised. But if, rather than considering example2.org the "authority", we just need some entry point(s) from the client to another, potentially decentralised, federation then this syntax doesn't work and we should find something else.

On yet another hand (and I'm getting carried away quite a bit here), if we talk about Matrix being a bunch of disparate federations then we might want to devise monikers for each federation, and those monikers could be "authority" names, with an assumption that clients somehow "know" how to find an entry point by a moniker (yet another naming service, yeah). That's really beyond the scope of this issue, anyway.

@ara4n
Copy link
Member Author

ara4n commented Oct 8, 2019

this is actually breaking things quite badly on the mozilla instance, as people who connect via non mozilla-test.riot.im will see URL previews for pills.

@KitsuneRal
Copy link
Member

Well, that obviously needs support on both ends - in matrix.to as well as in a client (because the client is tightly integrated with matrix.to). I don't think you can get away without changing the client to enable custom prefixes.

@ShadowJonathan
Copy link
Contributor

On yet another hand (and I'm getting carried away quite a bit here), if we talk about Matrix being a bunch of disparate federations then we might want to devise monikers for each federation, and those monikers could be "authority" names, with an assumption that clients somehow "know" how to find an entry point by a moniker (yet another naming service, yeah). That's really beyond the scope of this issue, anyway.

A small comment or inspiration point for this, IPFS uses "dnslink" to tether a DNS TXT record to an IPFS resource, tangentially related to this aliasing usage, "pseudo-authorities" could be used to scope the query to a specific subsection, such as pinecone p2p, BLE, or site-local ipv6 multicast (pine.p2p, ble.p2p, ff05:[...])

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API enhancement A suggestion for a relatively simple improvement to the protocol
Projects
None yet
Development

No branches or pull requests

4 participants