Skip to content

Commit

Permalink
MSC3531: Applying feedback: reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoric committed Nov 30, 2021
1 parent 69fdd50 commit 0d4d8d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions proposals/3531-hidden-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ Events with relation `m.visibility` are ignored if they are sent by users with
powerlevel below `m.visibility`. This relation controls whether *clients* should
display an event or hide it.

Additionally, an event with relation `m.visibility` may have a content field `reason`
used to display a human-readable reason for which the original event is hidden
(e.g. "Message pending moderation", "Image pending moderation", etc.)

### Server behavior

No changes in server behavior.
Expand All @@ -73,12 +77,15 @@ No changes in server behavior.
1. In every display of `original_event`, either by itself or in a reaction
1. If the current user is the sender of `original_event`
1. Label the display of `original_event` with a label such as `(pending moderation)`
1. If `event.content` contains a string field `reason`, this field may be used to display a reason for moderation.
1. Otherwise, if the current user has a powerlevel greater or
equal to `m.visibility`
1. Display `original_event` as a spoiler.
1. Label the display of `original_event` with a label such as `(pending moderation)`
1. If `event.content` contains a string field `reason`, this field may be used to display a reason for moderation.
1. Otherwise
1. Instead of displaying `original_event`, display a message such as `Message is pending moderation`
1. If `event.content` contains a string field `reason`, this field may be used to display a reason for moderation.
1. Otherwise, if `event` specifies a visibility of "visible", mark `original_event` as visible
1. Display `original_event` exactly as it would be displayed without this MSC
1. Otherwise, ignore
Expand Down Expand Up @@ -197,4 +204,6 @@ During the prototyping phase:
`org.matrix.msc3531.visibility`;
- field `visibility` should also be prefixed into
`org.matrix.msc3531.visibility`;
- field `reason` should also be prefixed into
`org.matrix.msc3531.reason`;
- constants `visible` and `hidden` remain unchanged.

0 comments on commit 0d4d8d4

Please sign in to comment.