From a82b657a0a9251f130b23feda588ecbc03f6c89c Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Wed, 14 Oct 2020 22:44:13 -0500 Subject: [PATCH] Attempt to differentiate between m.room.redaction event PL and redact PL Signed-off-by: Aaron Raimist --- api/client-server/redaction.yaml | 9 ++++++--- event-schemas/schema/m.room.power_levels | 11 ++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/api/client-server/redaction.yaml b/api/client-server/redaction.yaml index 52ff3064..1dbdf76e 100644 --- a/api/client-server/redaction.yaml +++ b/api/client-server/redaction.yaml @@ -36,9 +36,12 @@ paths: This cannot be undone. - Any user with a power level greater than or equal to the ``redact`` power level - of the room may redact events there. Additionally, server administrators may - redact messages sent by their server. + 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: [] diff --git a/event-schemas/schema/m.room.power_levels b/event-schemas/schema/m.room.power_levels index 06f55d26..8e94bcc0 100644 --- a/event-schemas/schema/m.room.power_levels +++ b/event-schemas/schema/m.room.power_levels @@ -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:: @@ -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: |-