|
| 1 | +# MSC4142: Remove unintentional intentional mentions in replies |
| 2 | + |
| 3 | +Currently, the reply spec has a section called [Mentioning the replied to user](https://spec.matrix.org/v1.10/client-server-api/#mentioning-the-replied-to-user) |
| 4 | +which says |
| 5 | + |
| 6 | +> In order to notify users of the reply, it may be desirable to include the |
| 7 | +> sender of the replied to event and any users mentioned in that event. See |
| 8 | +> [user and room mentions](https://spec.matrix.org/v1.10/client-server-api/#user-and-room-mentions) |
| 9 | +> for additional information. |
| 10 | +
|
| 11 | +The "*any users mentioned in that event*" part is particularly problematic, as |
| 12 | +it effectively means all mentions will be propagated forever through a reply |
| 13 | +chain, causing lots of unintentional pings. |
| 14 | + |
| 15 | +The propagation was originally added to preserve the old reply fallback mention |
| 16 | +behavior where explicit mentions in the replied-to message were be copied to |
| 17 | +the reply fallback and therefore caused pings. However, the current spec copies |
| 18 | +far more than just explicit pings from the replied-to message. Additionally, no |
| 19 | +other chat application that I know of propagates mentions like that. |
| 20 | + |
| 21 | +## Proposal |
| 22 | +The proposed fix is to stop propagating mentions entirely. The `m.mentions` |
| 23 | +object of replies should only contain explicit mentions in the new message, |
| 24 | +plus the sender of the replied-to message. The mentions in the replied-to |
| 25 | +message are ignored. |
| 26 | + |
| 27 | +Clients are still free to add other mentions to the list as they see fit. For |
| 28 | +example, a client could offer a button to mention all users in a reply chain. |
| 29 | +This proposal simply changes the default behavior recommended in the spec. |
| 30 | + |
| 31 | +## Potential issues |
| 32 | +Users who have already got used to the new behavior may be surprised when they |
| 33 | +don't get mentioned by reply chains. |
| 34 | + |
| 35 | +## Alternatives |
| 36 | +### Split `m.mentions` |
| 37 | +To preserve the old reply fallback behavior, `m.mentions` could be split into |
| 38 | +"explicit" and "implicit", so that replies copy explicit mentions into the |
| 39 | +implicit list. Future replies would then only copy new explicit pings and |
| 40 | +wouldn't cause an infinite chain. |
| 41 | + |
| 42 | +Since other chat applications don't copy pings at all, having a weird feature |
| 43 | +like that doesn't seem worth the additional complexity. |
| 44 | + |
| 45 | +## Security considerations |
| 46 | +This proposal doesn't touch anything security-sensitive. |
| 47 | + |
| 48 | +## Unstable prefix |
| 49 | +Not applicable, this proposal only changes how the existing `m.mentions` object |
| 50 | +is filled for replies. |
| 51 | + |
0 commit comments