From baf8948eb5b3be04f06bba0fce87153834bda16f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 24 Feb 2019 21:53:50 -0700 Subject: [PATCH] Describe M_UNSUPPORTED_ROOM_VERSION on invite and createRoom endpoints Spec for MSC1866: https://github.com/matrix-org/matrix-doc/pull/1866 --- api/client-server/create_room.yaml | 6 ++++++ api/client-server/inviting.yaml | 14 ++++++++++++++ .../client_server/newsfragments/1903.feature | 1 + 3 files changed, 21 insertions(+) create mode 100644 changelogs/client_server/newsfragments/1903.feature diff --git a/api/client-server/create_room.yaml b/api/client-server/create_room.yaml index d361d973..bce61aad 100644 --- a/api/client-server/create_room.yaml +++ b/api/client-server/create_room.yaml @@ -244,6 +244,12 @@ paths: invalid: for example, the user's ``power_level`` is set below that necessary to set the room name (``errcode`` set to ``M_INVALID_ROOM_STATE``). + + - The homeserver doesn't support the requested room version, or + one or more users being invited to the new room are residents + of a homeserver which does not support the requested room version. + The ``errcode`` will be ``M_UNSUPPORTED_ROOM_VERSION`` in these + cases. schema: "$ref": "definitions/errors/error.yaml" tags: diff --git a/api/client-server/inviting.yaml b/api/client-server/inviting.yaml index f312d5ce..dfa66b9b 100644 --- a/api/client-server/inviting.yaml +++ b/api/client-server/inviting.yaml @@ -82,6 +82,20 @@ paths: } schema: type: object + 400: + description: |- + + The request is invalid. A meaningful ``errcode`` and description + error text will be returned. Example reasons for rejection include: + + - The request body is malformed (``errcode`` set to ``M_BAD_JSON`` + or ``M_NOT_JSON``). + + - One or more users being invited to the room are residents of a + homeserver which does not support the requested room version. The + ``errcode`` will be ``M_UNSUPPORTED_ROOM_VERSION`` in these cases. + schema: + "$ref": "definitions/errors/error.yaml" 403: description: |- You do not have permission to invite the user to the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are: diff --git a/changelogs/client_server/newsfragments/1903.feature b/changelogs/client_server/newsfragments/1903.feature new file mode 100644 index 00000000..1c64d826 --- /dev/null +++ b/changelogs/client_server/newsfragments/1903.feature @@ -0,0 +1 @@ +Emit ``M_UNSUPPORTED_ROOM_VERSION`` error codes where applicable on ``/createRoom`` and ``/invite`` APIs.