From 7d94aaace8a799927673d53fa49b5f28c7d83acd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 3 Jul 2018 14:59:41 -0600 Subject: [PATCH 1/2] Explicitly declare that the kick/ban reason will be on the membership event Fixes https://github.com/matrix-org/matrix-doc/issues/798 --- api/client-server/banning.yaml | 3 ++- api/client-server/kicking.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/client-server/banning.yaml b/api/client-server/banning.yaml index 3877f0e9..4030f46b 100644 --- a/api/client-server/banning.yaml +++ b/api/client-server/banning.yaml @@ -61,7 +61,8 @@ paths: description: The fully qualified user ID of the user being banned. reason: type: string - description: The reason the user has been banned. + description: The reason the user has been banned. This will be supplied as the + ``reason`` on the target's updated `m.room.member`_ event. required: ["user_id"] responses: 200: diff --git a/api/client-server/kicking.yaml b/api/client-server/kicking.yaml index ef43c0ee..bacc806e 100644 --- a/api/client-server/kicking.yaml +++ b/api/client-server/kicking.yaml @@ -34,6 +34,10 @@ paths: Kick a user from the room. The caller must have the required power level in order to perform this operation. + + Kicking a user adjusts the target member's membership state to be ``leave`` with an + optional ``reason``. Like with other membership changes, a user can directly adjust + the target member's state by making a request to ``/rooms//state/m.room.member/``. operationId: kick security: - accessToken: [] @@ -59,7 +63,9 @@ paths: description: The fully qualified user ID of the user being kicked. reason: type: string - description: The reason the user has been kicked. + description: |- + The reason the user has been kicked. This will be supplied as the + ``reason`` on the target's updated `m.room.member`_ event. required: ["user_id"] responses: 200: From 5b6ad6f39d5792c987b4bee60989b8a2b026f9b3 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 3 Jul 2018 15:19:33 -0600 Subject: [PATCH 2/2] Add to changelog --- changelogs/client_server.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelogs/client_server.rst b/changelogs/client_server.rst index feabecab..a16b96ae 100644 --- a/changelogs/client_server.rst +++ b/changelogs/client_server.rst @@ -39,6 +39,8 @@ Unreleased changes (`#1245 `_). - Describe ``StateEvent`` for ``/createRoom`` (`#1329 `_). + - Describe how the ``reason`` is handled for kicks/bans + (`#1362 `_). - Changes to the API which will be backwards-compatible for clients: