|
1 | 1 | # MSC2285: Hidden read receipts
|
2 | 2 |
|
3 |
| -Currently users must send read receipts in order to affect their notification counts, which |
4 |
| -alerts to other people that the user has read their message. For primarily privacy reasons, |
5 |
| -it may be desirable to users to not advertise to others that they've read a message. |
| 3 | +Currently users must send read receipts in order to affect their notification |
| 4 | +counts, which alerts other people that the user has read their message. For |
| 5 | +primarily privacy reasons, it may be desirable to users to not advertise to |
| 6 | +others that they've read a message. |
6 | 7 |
|
7 | 8 | ## Proposal
|
8 | 9 |
|
9 |
| -When sending a `m.read` receipt, a `m.hidden: true` flag can be included (optional) to tell |
10 |
| -the server to not send it to anyone else. This allows the user to affect their notification |
11 |
| -counts without advertising that they've read the message. `m.hidden` defaults to `false`. |
| 10 | +This MSC proposes adding a new `receiptType` of `m.read.private`. This |
| 11 | +`receiptType` is used when the user wants to affect their notification count but |
| 12 | +doesn't want other users to see their read receipt. |
12 | 13 |
|
13 |
| -For example: |
14 |
| -``` |
15 |
| -POST /_matrix/client/r0/rooms/!a:example.org/receipt/m.read/$123 |
16 |
| -{ |
17 |
| - "m.hidden": true |
18 |
| -} |
19 |
| -``` |
| 14 | +To move the user's private read receipt to `$123` the client can make a POST |
| 15 | +request such as this. |
20 | 16 |
|
21 |
| -The same applies to read markers (which allow you to update your read receipt): |
| 17 | +```HTTP |
| 18 | +POST /_matrix/client/r0/rooms/!a:example.org/receipt/m.read.private/$123 |
| 19 | +{} |
22 | 20 | ```
|
| 21 | + |
| 22 | +To also move the user's `m.fully_read` marker and `m.read` receipt the client |
| 23 | +can make a POST request such as this. |
| 24 | + |
| 25 | +```HTTP |
23 | 26 | POST /_matrix/client/r0/rooms/!a:example.org/read_markers
|
24 | 27 | {
|
25 | 28 | "m.fully_read": "$123",
|
26 | 29 | "m.read": "$123",
|
27 |
| - "m.hidden": true |
| 30 | + "m.read.private": "$123", |
28 | 31 | }
|
29 | 32 | ```
|
30 | 33 |
|
31 |
| -Note that fully read markers are not sent to other users and are local to the user sending them. |
32 |
| -Therefore, no changes are required or implied by `m.hidden` for `m.fully_read` - just `m.read`. |
| 34 | +It is assumed that if only an `m.read` receipt is received, the `m.read.private` |
| 35 | +should also be moved. |
33 | 36 |
|
34 |
| -Servers processing read receipts MUST NOT send hidden receipts to any other user than the sender. |
35 |
| -Servers MUST NOT send hidden receipts over federation to any server. |
| 37 | +The `m.read` is now optional as sometimes we only want to send `m.read.private`. |
36 | 38 |
|
37 |
| -## Tradeoffs |
38 |
| - |
39 |
| -Clients which support read receipts would end up rendering the user's receipt as jumping down |
40 |
| -when they send a message. This is no different from how IRC and similarly bridged users are |
41 |
| -perceived today. |
| 39 | +Servers MUST NOT send receipts of `receiptType` `m.read.private` to any other |
| 40 | +user than the sender. Servers also MUST NOT send receipts of `receiptType` |
| 41 | +`m.read.private` to any server over federation. |
42 | 42 |
|
43 | 43 | ## Security considerations
|
44 | 44 |
|
45 |
| -Servers could ignore the flag without telling the user. The user must already trust the homeserver |
46 |
| -to a degree however, and the methods of notifying the user to the problem are difficult to |
47 |
| -implement. Users can always run their own homeservers to ensure it behaves correctly. |
| 45 | +Servers could act as if `m.read.private` is the same as `m.read` so the user |
| 46 | +must already trust the homeserver to a degree however, and the methods of |
| 47 | +notifying the user to the problem are difficult to implement. Users can always |
| 48 | +run their own homeservers to ensure it behaves correctly. |
| 49 | + |
| 50 | +## Potential issues |
| 51 | + |
| 52 | +Clients which support read receipts would end up rendering the user's receipt as |
| 53 | +jumping down when they send a message. This is no different from how IRC and |
| 54 | +similarly bridged users are perceived today. |
48 | 55 |
|
49 |
| -## Why not X kind of EDUs? |
| 56 | +## Alternatives |
50 | 57 |
|
51 |
| -In short: don't send those EDUs. Typing notifications, device messages, etc can all be mitigated |
52 |
| -by simply not calling the endpoints. Read receipts have a side effect of causing stuck |
53 |
| -notifications for users however, which is why they are solved here. |
| 58 | +It has been suggested to use account data to control this on a per-account |
| 59 | +basis. While this might have some benefits, it is much less flexible and would |
| 60 | +lead to us inventing a way to store per-account settings in account data which |
| 61 | +should be handled in a separate MSC. |
| 62 | + |
| 63 | +Previous iterations of this MSC additionally suggested that having an `m.hidden` |
| 64 | +flag on existing read receipts could work, however this feels like assigning too |
| 65 | +much responsibility to an existing structure. |
54 | 66 |
|
55 | 67 | ## Unstable prefix
|
56 | 68 |
|
57 |
| -While this MSC is not considered stable, implementations should use `org.matrix.msc2285` as a namespace |
58 |
| -for identifiers. `m.hidden` becomes `org.matrix.msc2285.hidden` for example. |
| 69 | +While this MSC is not considered stable, implementations should use |
| 70 | +`org.matrix.msc2285` as a namespace. |
| 71 | + |
| 72 | +|Release |Development | |
| 73 | +|----------------|---------------------------------| |
| 74 | +|`m.read.private`|`org.matrix.msc2285.read.private`| |
59 | 75 |
|
60 |
| -To detect server support, clients can either rely on the spec version (when stable) or the presence of |
61 |
| -a `org.matrix.msc2285` flag in `unstable_features` on `/versions`. Clients are recommended to check for |
62 |
| -server support to ensure they are not misleading the user about "hidden read receipts". |
| 76 | +To detect server support, clients can either rely on the spec version (when |
| 77 | +stable) or the presence of a `org.matrix.msc2285` flag in `unstable_features` |
| 78 | +on `/versions`. Clients are recommended to check for server support to ensure |
| 79 | +they are not misleading the user about their read receipts not being visible to |
| 80 | +other users. |
0 commit comments