From d12593feeac9d3370afd8020e82eebab197fb967 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 28 Jan 2019 22:15:59 -0700 Subject: [PATCH] Specify the room_version response property on /make_{leave|join} Original proposal: https://github.com/matrix-org/matrix-doc/pull/1813 Implementation proof: https://github.com/matrix-org/synapse/pull/4447 There are no changes from the original proposal. --- api/server-server/joins.yaml | 15 +++++++++++---- api/server-server/leaving.yaml | 11 +++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/api/server-server/joins.yaml b/api/server-server/joins.yaml index 6d97e3aab..3c0ec48f0 100644 --- a/api/server-server/joins.yaml +++ b/api/server-server/joins.yaml @@ -65,6 +65,12 @@ paths: schema: type: object properties: + room_version: + type: string + description: |- + The version of the room where the server is trying to join. If not provided, + the room version is assumed to be either "1" or "2". + example: "2" event: allOf: - $ref: "definitions/unsigned_pdu.yaml" @@ -80,7 +86,7 @@ paths: origin: type: string description: The name of the resident homeserver. - example: "matrix.org" + example: "matrix.org" origin_server_ts: type: integer format: int64 @@ -113,7 +119,7 @@ paths: type: array description: |- An event reference list containing the authorization events that would - allow the member to join the room. This should normally be the + allow the member to join the room. This should normally be the ``m.room.create``, ``m.room.power_levels``, and ``m.room.join_rules`` events. items: @@ -143,7 +149,8 @@ paths: - state_key examples: application/json: { - event: { + "room_version": "2", + "event": { "$ref": "examples/unsigned_pdu.json", "type": "m.room.member", "state_key": "@someone:example.org", @@ -220,7 +227,7 @@ paths: origin: type: string description: The name of the joining homeserver. - example: "matrix.org" + example: "matrix.org" origin_server_ts: type: integer format: int64 diff --git a/api/server-server/leaving.yaml b/api/server-server/leaving.yaml index bb4bbe3d6..68ada9d70 100644 --- a/api/server-server/leaving.yaml +++ b/api/server-server/leaving.yaml @@ -57,6 +57,12 @@ paths: schema: type: object properties: + room_version: + type: string + description: |- + The version of the room where the server is trying to leave. If not provided, + the room version is assumed to be either "1" or "2". + example: "2" event: allOf: - $ref: "definitions/unsigned_pdu.yaml" @@ -101,7 +107,7 @@ paths: type: array description: |- An event reference list containing the authorization events that would - allow the member to leave the room. This should normally be the + allow the member to leave the room. This should normally be the ``m.room.create``, ``m.room.power_levels``, and ``m.room.join_rules`` events. items: @@ -131,6 +137,7 @@ paths: - state_key examples: application/json: { + "room_version": "2", "event": { "$ref": "examples/unsigned_pdu.json", "type": "m.room.member", @@ -194,7 +201,7 @@ paths: origin: type: string description: The name of the leaving homeserver. - example: "matrix.org" + example: "matrix.org" origin_server_ts: type: integer format: int64