-
Notifications
You must be signed in to change notification settings - Fork 418
MSC4156: Migrate server_name to via #4156
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
Merged
anoadragon453
merged 7 commits into
matrix-org:main
from
Johennes:johannes/server-name-to-via
Aug 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d4c58a9
MSC4156: Migrate server_name to via
Johennes 5a97bc2
Ignore server_name when via is present
Johennes fe3e01e
Update proposals/4156-server-name-to-via.md
Johennes ae3677c
Stress that the domain part is merely a namespace and not a routing s…
Johennes 0a8e6e1
Downgrade clients use of `via` to SHOULD
Johennes ae4e79c
Clarify that server support can be detected through the supported spe…
Johennes 7b3a7b3
Add security consideration
Johennes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # MSC4156: Migrate `server_name` to `via` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just wanted to say that this sounds to me like a sensible idea to try to standardise terminology in this case to make everyones lives easier. Thanks for this very sensible proposal. |
||
|
|
||
| Room IDs in Matrix are generally not routable on their own. In the [room ID grammar] `!opaque_id:domain`, | ||
| the `domain` is the server that created the room. There is, however, no guarantee that this server is | ||
| still joined to the room at a later time. Therefore, room IDs don't provide a reliable resident server | ||
| to send requests to. | ||
Johennes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The spec partially addresses this issue by defining a [`via`] query parameter on room URIs that can be | ||
| used to list servers that have a high probability of being in the room in the distant future. Additionally, | ||
| some APIs such as [`/_matrix/client/v3/join/{roomIdOrAlias}`] can take a `server_name` query parameter | ||
| that has the same effect as `via`. | ||
|
|
||
| The terminology difference between `server_name` and `via` can be slightly confusing which is why this | ||
| proposal attempts to standardize on `via`. | ||
|
|
||
|
|
||
| ## Proposal | ||
|
|
||
| The `server_name` query parameter on [`/_matrix/client/v3/join/{roomIdOrAlias}`] and | ||
| [`/_matrix/client/v3/knock/{roomIdOrAlias}`] is deprecated and a new parameter `via: [string]` is | ||
| introduced. Clients MUST use `via` when the homeserver they're talking to supports it. To do this, they | ||
| MAY either detect server support through [`/_matrix/client/versions`] or always include both parameters. | ||
Johennes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Homeservers MUST prefer `via` if both parameters are supplied. | ||
clokep marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ## Potential issues | ||
|
|
||
| As with any migration, some effort will be required to update client and server implementations. Additionally, | ||
| while the transitions isn't completed, the concurrent existence of both query parameters might lead to further | ||
| confusion. | ||
|
|
||
|
|
||
| ## Alternatives | ||
|
|
||
| None other than accepting status quo. | ||
|
|
||
|
|
||
| ## Security considerations | ||
|
|
||
| None. | ||
Johennes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ## Unstable prefix | ||
|
|
||
| Until this proposal is accepted into the spec, implementations SHOULD refer to `via` as `org.matrix.msc4156.via`. | ||
|
|
||
|
|
||
| ## Dependencies | ||
|
|
||
| None. | ||
|
|
||
|
|
||
| [room ID grammar]: https://spec.matrix.org/v1.10/appendices/#room-ids | ||
| [`via`]: https://spec.matrix.org/v1.10/appendices/#routing | ||
| [`/_matrix/client/v3/join/{roomIdOrAlias}`]: https://spec.matrix.org/v1.10/client-server-api/#post_matrixclientv3joinroomidoralias | ||
| [`/_matrix/client/v3/knock/{roomIdOrAlias}`]: https://spec.matrix.org/v1.10/client-server-api/#post_matrixclientv3knockroomidoralias | ||
| [`/_matrix/client/versions`]: https://spec.matrix.org/v1.10/client-server-api/#get_matrixclientversions | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.