-
Notifications
You must be signed in to change notification settings - Fork 375
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
MSC4132: Deprecate Linking to an Event Against a Room Alias #4132
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8e0807c
Deprecate Linking to an Event Against a Room Alias
pixlwave 6d79453
Pin the spec links
pixlwave 6d3c7c4
Address feedback.
pixlwave 1ac9740
Address comments about via and the URIs that should be used.
pixlwave 69b8f14
Rewording.
pixlwave 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 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,58 @@ | ||
# MSC4132: Deprecate Linking to an Event Against a Room Alias. | ||
|
||
## Introduction | ||
|
||
The spec supports 2 types of URI, the [Matrix scheme](https://spec.matrix.org/v1.10/appendices/#matrix-uri-scheme) | ||
and [matrix.to](https://spec.matrix.org/v1.10/appendices/#matrixto-navigation) links which allow deep linking to | ||
Matrix users, rooms and events. Event URIs can be constructed against either a room ID or a room alias the latter of | ||
which is fragile issue as a room's alias is mutable and so event links may be broken by changes to the alias. Users | ||
expect deep links to continue working so that older links continue to show the correct content. Therefore it is proposed | ||
to deprecate event links against a room alias. | ||
|
||
|
||
## Proposal | ||
pixlwave marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
As room IDs are immutable, event URIs built against these will continue to work for as long as the room is reachable by | ||
the homeserver. In contrast, event URIs built against a room alias can break under the following circumstances: | ||
- The room is upgraded, resulting in the alias pointing to the new room, which won't contain any events from the | ||
ancestor. | ||
- The alias is removed/changed resulting in a dead link that can't be resolved. | ||
|
||
The proposal would [deprecate](https://spec.matrix.org/v1.10/#deprecation-policy) the 2 following URIs: | ||
- Link to `$event` in `#somewhere:example.org`: `matrix:r/somewhere:example.org/e/event` | ||
pixlwave marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Link to `$event` in `#somewhere:example.org`: `https://matrix.to/#/%23somewhere:example.org/%24event%3Aexample.org` | ||
|
||
Specifically this means it would be marked in the spec as not to be used in future and clients should: | ||
1. Stop making new event URIs with room aliases, generating the examples above as the following respectively: | ||
- `matrix:roomid/opaqueid:example.org/e/event?via=example.com` | ||
- `https://matrix.to/#/!opaqueid%3Aexample.org/%24event%3Aexample.org?via=example.com` | ||
2. Continue to accept them as it will take time for other clients to update and legacy events will continue to exist. | ||
|
||
It is worth nothing that this change would require clients to always add the `via=` fields when building event URIs as | ||
these are expected for URIs that reference a room ID. | ||
|
||
|
||
## Potential issues | ||
|
||
Whilst most clients do take the sensible route and generate event URIs against a room ID (even when it has an alias), as | ||
pixlwave marked this conversation as resolved.
Show resolved
Hide resolved
|
||
it is part of the spec these kinds of links likely exist somewhere in room history and on the World Wide Web. This would | ||
mean that after deprecation clients may still want to handle these URIs when received. | ||
|
||
Additionally, whilst not a new problem some clients don't always update the `via` fields, which poses a problem for | ||
rooms that have lots of single user homeservers: A single user leaving can result in the `via` to become non functional | ||
which over time can result in unreachable room IDs (this is essentially the equivalent of the alias being removed). | ||
|
||
|
||
## Alternatives | ||
|
||
An alternative would be to leave things as they are, although this wouldn't be the best choice for the user. | ||
|
||
|
||
## Security considerations | ||
|
||
It is unlikely that accepting this change would introduce any security considerations. | ||
|
||
|
||
## Dependencies | ||
|
||
N/A |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation requirements:
None, in my opinion. This MSC deprecates a feature and already appears to be unimplemented (for the most part).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pointing out that it seems that Nheko does this as of 0.11.3, which is currently the latest release.