Skip to content

Commit 0d4d8d4

Browse files
committed
MSC3531: Applying feedback: reason
1 parent 69fdd50 commit 0d4d8d4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

proposals/3531-hidden-messages.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Events with relation `m.visibility` are ignored if they are sent by users with
6060
powerlevel below `m.visibility`. This relation controls whether *clients* should
6161
display an event or hide it.
6262

63+
Additionally, an event with relation `m.visibility` may have a content field `reason`
64+
used to display a human-readable reason for which the original event is hidden
65+
(e.g. "Message pending moderation", "Image pending moderation", etc.)
66+
6367
### Server behavior
6468

6569
No changes in server behavior.
@@ -73,12 +77,15 @@ No changes in server behavior.
7377
1. In every display of `original_event`, either by itself or in a reaction
7478
1. If the current user is the sender of `original_event`
7579
1. Label the display of `original_event` with a label such as `(pending moderation)`
80+
1. If `event.content` contains a string field `reason`, this field may be used to display a reason for moderation.
7681
1. Otherwise, if the current user has a powerlevel greater or
7782
equal to `m.visibility`
7883
1. Display `original_event` as a spoiler.
7984
1. Label the display of `original_event` with a label such as `(pending moderation)`
85+
1. If `event.content` contains a string field `reason`, this field may be used to display a reason for moderation.
8086
1. Otherwise
8187
1. Instead of displaying `original_event`, display a message such as `Message is pending moderation`
88+
1. If `event.content` contains a string field `reason`, this field may be used to display a reason for moderation.
8289
1. Otherwise, if `event` specifies a visibility of "visible", mark `original_event` as visible
8390
1. Display `original_event` exactly as it would be displayed without this MSC
8491
1. Otherwise, ignore
@@ -197,4 +204,6 @@ During the prototyping phase:
197204
`org.matrix.msc3531.visibility`;
198205
- field `visibility` should also be prefixed into
199206
`org.matrix.msc3531.visibility`;
207+
- field `reason` should also be prefixed into
208+
`org.matrix.msc3531.reason`;
200209
- constants `visible` and `hidden` remain unchanged.

0 commit comments

Comments
 (0)