Skip to content

Commit 2534644

Browse files
pixlwaveturt2live
andauthored
MSC4132: Deprecate Linking to an Event Against a Room Alias (#4132)
* Deprecate Linking to an Event Against a Room Alias * Pin the spec links Co-authored-by: Travis Ralston <[email protected]> * Address feedback. * Address comments about via and the URIs that should be used. * Rewording. --------- Co-authored-by: Travis Ralston <[email protected]>
1 parent 8eb75fe commit 2534644

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# MSC4132: Deprecate Linking to an Event Against a Room Alias.
2+
3+
## Introduction
4+
5+
The spec supports 2 types of URI, the [Matrix scheme](https://spec.matrix.org/v1.10/appendices/#matrix-uri-scheme)
6+
and [matrix.to](https://spec.matrix.org/v1.10/appendices/#matrixto-navigation) links which allow deep linking to
7+
Matrix users, rooms and events. Event URIs can be constructed against either a room ID or a room alias the latter of
8+
which is fragile issue as a room's alias is mutable and so event links may be broken by changes to the alias. Users
9+
expect deep links to continue working so that older links continue to show the correct content. Therefore it is proposed
10+
to deprecate event links against a room alias.
11+
12+
13+
## Proposal
14+
15+
As room IDs are immutable, event URIs built against these will continue to work for as long as the room is reachable by
16+
the homeserver. In contrast, event URIs built against a room alias can break under the following circumstances:
17+
- The room is upgraded, resulting in the alias pointing to the new room, which won't contain any events from the
18+
ancestor.
19+
- The alias is removed/changed resulting in a dead link that can't be resolved.
20+
21+
The proposal would [deprecate](https://spec.matrix.org/v1.10/#deprecation-policy) the 2 following URIs:
22+
- Link to `$event` in `#somewhere:example.org`: `matrix:r/somewhere:example.org/e/event`
23+
- Link to `$event` in `#somewhere:example.org`: `https://matrix.to/#/%23somewhere:example.org/%24event%3Aexample.org`
24+
25+
Specifically this means it would be marked in the spec as not to be used in future and clients should:
26+
1. Stop making new event URIs with room aliases, generating the examples above as the following respectively:
27+
- `matrix:roomid/opaqueid:example.org/e/event?via=example.com`
28+
- `https://matrix.to/#/!opaqueid%3Aexample.org/%24event%3Aexample.org?via=example.com`
29+
2. Continue to accept them as it will take time for other clients to update and legacy events will continue to exist.
30+
31+
It is worth nothing that this change would require clients to always add the `via=` fields when building event URIs as
32+
these are expected for URIs that reference a room ID.
33+
34+
35+
## Potential issues
36+
37+
Whilst most clients do take the sensible route and generate event URIs against a room ID (even when it has an alias), as
38+
it is part of the spec these kinds of links likely exist somewhere in room history and on the World Wide Web. This would
39+
mean that after deprecation clients may still want to handle these URIs when received.
40+
41+
Additionally, whilst not a new problem some clients don't always update the `via` fields, which poses a problem for
42+
rooms that have lots of single user homeservers: A single user leaving can result in the `via` to become non functional
43+
which over time can result in unreachable room IDs (this is essentially the equivalent of the alias being removed).
44+
45+
46+
## Alternatives
47+
48+
An alternative would be to leave things as they are, although this wouldn't be the best choice for the user.
49+
50+
51+
## Security considerations
52+
53+
It is unlikely that accepting this change would introduce any security considerations.
54+
55+
56+
## Dependencies
57+
58+
N/A

0 commit comments

Comments
 (0)