Skip to content

Commit a402da4

Browse files
authored
Merge pull request #2814 from aaronraimist/m.room.redaction
Clarify m.room.redaction, remove duplicate entry
2 parents 48d4e95 + a82b657 commit a402da4

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

api/client-server/redaction.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ paths:
3636
3737
This cannot be undone.
3838
39-
Users may redact their own events, and any user with a power level
40-
greater than or equal to the ``redact`` power level of the room may
41-
redact events there.
39+
Any user with a power level greater than or equal to the ``m.room.redaction``
40+
event power level may send redaction events in the room. If the user's power
41+
level greater is also greater than or equal to the ``redact`` power level
42+
of the room, the user may redact events sent by other users.
43+
44+
Server administrators may redact events sent by users on their server.
4245
operationId: redactEvent
4346
security:
4447
- accessToken: []
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify description of m.room.redaction event.

event-schemas/schema/m.room.power_levels

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ description: |-
2525
``events_default`` are 0.
2626

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

3334
.. NOTE::
3435

@@ -65,7 +66,7 @@ properties:
6566
description: The level required to kick a user. Defaults to 50 if unspecified.
6667
type: integer
6768
redact:
68-
description: The level required to redact an event. Defaults to 50 if unspecified.
69+
description: The level required to redact an event sent by another user. Defaults to 50 if unspecified.
6970
type: integer
7071
state_default:
7172
description: |-

event-schemas/schema/m.room.redaction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
allOf:
33
- $ref: core-event-schema/room_event.yaml
4-
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.'
4+
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.'
55
properties:
66
content:
77
properties:

specification/client_server_api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,8 +1551,6 @@ prefixed with ``m.``
15511551

15521552
{{m_room_power_levels_event}}
15531553

1554-
{{m_room_redaction_event}}
1555-
15561554
Historical events
15571555
+++++++++++++++++
15581556

0 commit comments

Comments
 (0)