Skip to content

Commit ffa4b4b

Browse files
committed
MSC: Ignore invites
Signed-off: David Teller <davidt@element.io>
1 parent 3ab1638 commit ffa4b4b

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

proposals/XXXX-ignore-more.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# MSCXXXX: Ignoring invites
2+
3+
Matrix supports an event "m.ignored_user_list" to entirely ignore some users.
4+
5+
In some cases, ignoring the user is the wrong granularity, e.g. we may wish to:
6+
7+
- ignore invites to rooms entirely;
8+
- ignore invites from some servers entirely.
9+
10+
While both features are pretty easy to implement client-side, standardizing how this preference
11+
is stored as part of the account is necessary to make sure that users can share this ignore list
12+
across devices and sessions.
13+
14+
## Proposal
15+
16+
17+
Matrix currently supports a type `m.ignored_users_list` with content:
18+
19+
| Content | Type | Description |
20+
|---------|------|-------------|
21+
| `ignored_users` | A maps of user ids to `{}` | A list of users to ignore |
22+
23+
24+
We adopt a similar `m.ignored_invites` with content:
25+
26+
| Content | Type | Description |
27+
|---------|------|-------------|
28+
| `ignored_user_ids` | optional `string[]` | Ignore invites from these users. |
29+
| `ignored_servers` | optional `string[]` | Ignore invites from users in these homeservers. |
30+
| `ignored_room_ids` | optional `string[]` | Ignore invites towards these rooms. |
31+
32+
### Client behaviour
33+
34+
If a user modifies `m.ignored_invites`, discard silently any matching pending invite
35+
currently displayed.
36+
37+
### Server behaviour
38+
39+
Wherever the server could filter out an event because of a `m.ignored_users_list`:
40+
- if the event is an invite; and
41+
- if `m.ignored_invites` is present in the recipient user's account; and
42+
- if the issuer is part of `ignored_user_ids` or the issuer is an account on `ignored_servers` or the invite room is part of `ignored_room_ids`, then filter out the event silently.
43+
44+
45+
The behavior of both client and server is expanded to also ignore any event issued from a server
46+
in `ignore_servers` wherever we would ignore an event from a user in `ignore_users`.
47+
48+
## Potential issues
49+
50+
There is a risk that the list of ignored invites of some users may grow a lot, which might have
51+
performance impact, both during initial sync and during filtering. We believe that this risk is
52+
limited. If necessary, clients may decide to cleanup ignored invites after some time.
53+
54+
## Alternatives
55+
56+
Can't think of any right now.
57+
58+
## Security considerations
59+
60+
Can't think of any right now.
61+
62+
## Unstable prefix
63+
64+
During testing, `m.ignored_invites` should be prefixed `org.matrix.mscxxxx.ignored_invites`.
65+
66+
Fields `ignored_user_ids`, `ignored_servers`, `ignored_room_ids` of this new event should remain unprefixed.
67+

0 commit comments

Comments
 (0)