Skip to content

Commit

Permalink
Merge pull request #2814 from aaronraimist/m.room.redaction
Browse files Browse the repository at this point in the history
Clarify m.room.redaction, remove duplicate entry
  • Loading branch information
turt2live committed Oct 16, 2020
2 parents 48d4e95 + a82b657 commit a402da4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
9 changes: 6 additions & 3 deletions api/client-server/redaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ paths:
This cannot be undone.
Users may redact their own events, and any user with a power level
greater than or equal to the ``redact`` power level of the room may
redact events there.
Any user with a power level greater than or equal to the ``m.room.redaction``
event power level may send redaction events in the room. If the user's power
level greater is also greater than or equal to the ``redact`` power level
of the room, the user may redact events sent by other users.
Server administrators may redact events sent by users on their server.
operationId: redactEvent
security:
- accessToken: []
Expand Down
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/2814.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify description of m.room.redaction event.
11 changes: 6 additions & 5 deletions event-schemas/schema/m.room.power_levels
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ description: |-
``events_default`` are 0.

The power level required to invite a user to the room, kick a user from the
room, ban a user from the room, or redact an event, is defined by ``invite``,
``kick``, ``ban``, and ``redact``, respectively. Each of these levels defaults
to 50 if they are not specified in the ``m.room.power_levels`` event, or if
the room contains no ``m.room.power_levels`` event.
room, ban a user from the room, or redact an event sent by another user, is
defined by ``invite``, ``kick``, ``ban``, and ``redact``, respectively. Each
of these levels defaults to 50 if they are not specified in the
``m.room.power_levels`` event, or if the room contains no ``m.room.power_levels``
event.

.. NOTE::

Expand Down Expand Up @@ -65,7 +66,7 @@ properties:
description: The level required to kick a user. Defaults to 50 if unspecified.
type: integer
redact:
description: The level required to redact an event. Defaults to 50 if unspecified.
description: The level required to redact an event sent by another user. Defaults to 50 if unspecified.
type: integer
state_default:
description: |-
Expand Down
2 changes: 1 addition & 1 deletion event-schemas/schema/m.room.redaction
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
allOf:
- $ref: core-event-schema/room_event.yaml
description: 'Events can be redacted by either room or server admins. Redacting an event means that all keys not required by the protocol are stripped off, allowing admins to remove offensive or illegal content that may have been attached to any event. This cannot be undone, allowing server owners to physically delete the offending data. There is also a concept of a moderator hiding a message event, which can be undone, but cannot be applied to state events. The event that has been redacted is specified in the ``redacts`` event level key.'
description: 'This event is created by the server to describe which event has been redacted, by whom, and optionally why. The event that has been redacted is specified in the ``redacts`` event level key. Redacting an event means that all keys not required by the protocol are stripped off, allowing messages to be hidden or allowing admins to remove offensive or illegal content.'
properties:
content:
properties:
Expand Down
2 changes: 0 additions & 2 deletions specification/client_server_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1551,8 +1551,6 @@ prefixed with ``m.``

{{m_room_power_levels_event}}

{{m_room_redaction_event}}

Historical events
+++++++++++++++++

Expand Down

0 comments on commit a402da4

Please sign in to comment.