diff --git a/api/client-server/leaving.yaml b/api/client-server/leaving.yaml index 36351fd4..57a148c6 100644 --- a/api/client-server/leaving.yaml +++ b/api/client-server/leaving.yaml @@ -78,8 +78,8 @@ paths: for this room. If all users on a homeserver forget a room, the room is eligible for deletion from that homeserver. - If the user is currently joined to the room, they will implicitly leave - the room as part of this API call. + If the user is currently joined to the room, they must leave the room + before calling this API. operationId: forgetRoom security: - accessToken: [] @@ -99,6 +99,15 @@ paths: } schema: type: object + 400: + description: The user has not left the room + examples: + application/json: { + "errcode": "M_UNKNOWN", + "error": "User @example:matrix.org is in room !au1ba7o:matrix.org" + } + schema: + "$ref": "definitions/error.yaml" 429: description: This request was rate-limited. schema: diff --git a/changelogs/client_server.rst b/changelogs/client_server.rst index a61027b0..3db37bc7 100644 --- a/changelogs/client_server.rst +++ b/changelogs/client_server.rst @@ -59,6 +59,8 @@ Unreleased changes (`#1380 `_). - Describe ``StateEvent`` for ``/createRoom`` (`#1329 `_). + - Clarify that clients must leave rooms before forgetting them + (`#1378 `_). - Clarify the request and result types on ``/search`` (`#1381 `_).