Skip to content

Commit 07ee4ff

Browse files
authored
MSC4210: Remove legacy mentions (#4210)
* Remove legacy mentions Signed-off-by: Tulir Asokan <tulir@maunium.net> * Add another potential issue Signed-off-by: Tulir Asokan <tulir@maunium.net> * Add new room version to alternatives Signed-off-by: Tulir Asokan <tulir@maunium.net> * Specify that including `m.mentions` in all events is still necessary Signed-off-by: Tulir Asokan <tulir@maunium.net> * Add links to current spec --------- Signed-off-by: Tulir Asokan <tulir@maunium.net>
1 parent 5beaf2e commit 07ee4ff

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# MSC4210: Remove legacy mentions
2+
Matrix v1.7 introduced [intentional mentions], where events list users they
3+
mention explicitly, instead of the recipients inferring mentions from the raw
4+
message text. For backwards-compatibility reasons, messages without the new
5+
`m.mentions` field still use the old plaintext matching for mentions.
6+
7+
[intentional mentions]: https://spec.matrix.org/v1.15/client-server-api/#user-and-room-mentions
8+
9+
Plaintext matching means it's very difficult for automated tools to tell which
10+
users are mentioned in a message. This means that it's easy to spam mentions by
11+
simply not using intentional mentions.
12+
13+
If intentional mentions are mandatory, automated tools could easily ban users
14+
who send more than X mentions in a single message. There could even be a new
15+
push rule condition to allow checking the number of mentioned users and skip
16+
notifying entirely.
17+
18+
## Proposal
19+
Support for legacy mentions is dropped. Specifically, the following deprecated
20+
standard push rules are removed entirely:
21+
22+
* [`.m.rule.contains_display_name`](https://spec.matrix.org/v1.15/client-server-api/#_m_rule_contains_display_name)
23+
* [`.m.rule.contains_user_name`](https://spec.matrix.org/v1.15/client-server-api/#_m_rule_contains_user_name)
24+
* [`.m.rule.roomnotif`](https://spec.matrix.org/v1.15/client-server-api/#_m_rule_roomnotif)
25+
26+
Additionally, the `contains_display_name` [push rule condition] is deprecated.
27+
28+
[push rule condition]: https://spec.matrix.org/v1.15/client-server-api/#conditions-1
29+
30+
Including an empty `m.mentions` key is still required for clients that are
31+
aware of intentional mentions, as omitting it would cause current clients to
32+
assume messages are not using intentional mentions.
33+
34+
## Potential issues
35+
Users using old clients (which don't send intentional mentions) will no longer
36+
be able to mention users on up-to-date clients/servers.
37+
38+
Users using old clients (which don't support the new push rule conditions) will
39+
also no longer be notified for mentions in case the client depends on the push
40+
rules served by the server.
41+
42+
## Alternatives
43+
The removal could be done in a new room version, such as when switching to
44+
extensible events, as suggested by [MSC3952]. However, such a migration will
45+
likely take much longer than clients implementing intentional mentions.
46+
Additionally, the room upgrade UX is still an open issue, which means many
47+
rooms simply don't upgrade. Therefore, making a slightly breaking change to
48+
existing room versions seems like the better option.
49+
50+
[MSC3952]: https://github.com/matrix-org/matrix-spec-proposals/pull/3952
51+
52+
## Security considerations
53+
This proposal doesn't add any features, so there are no new security
54+
considerations.
55+
56+
## Unstable prefix
57+
Not applicable, this proposal only removes features.
58+
59+
## Dependencies
60+
None.

0 commit comments

Comments
 (0)