diff --git a/changelogs/server_server/newsfragments/2319.removal b/changelogs/server_server/newsfragments/2319.removal new file mode 100644 index 00000000..7f17380e --- /dev/null +++ b/changelogs/server_server/newsfragments/2319.removal @@ -0,0 +1 @@ +Remove `/v1/send_join` and `/v1/send_leave`, as per [MSC4376](https://github.com/matrix-org/matrix-spec-proposals/pull/4376). \ No newline at end of file diff --git a/data/api/server-server/joins-v1.yaml b/data/api/server-server/joins-v1.yaml index 50bd3652..243135ef 100644 --- a/data/api/server-server/joins-v1.yaml +++ b/data/api/server-server/joins-v1.yaml @@ -234,207 +234,6 @@ paths: "errcode": "M_NOT_FOUND", "error": "Unknown room" } - "/send_join/{roomId}/{eventId}": - put: - deprecated: true - summary: Submit a signed join event to a resident server - description: |- - **Note:** - Servers should instead prefer to use the v2 `/send_join` endpoint. - - Submits a signed join event to the resident server for it - to accept it into the room's graph. Note that events have - a different format depending on the room version - check - the [room version specification](/rooms) for precise event formats. - **The request and response body here describe the common - event fields in more detail and may be missing other required - fields for a PDU.** - - The receiving server MUST apply certain validation before accepting the event. - A specific error code is not mandated, but servers SHOULD return `M_INVALID_PARAM` if: - - * The join event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events). - * The event type is not `m.room.member`. - * The `membership` field inside the event content is not `join`. - * The event sender is not a user ID on the origin server. - * The `state_key` is not equal to the `sender`. - operationId: sendJoinV1 - security: - - signedRequest: [] - parameters: - - in: path - name: roomId - description: The room ID that is about to be joined. - required: true - example: "!abc123:matrix.org" - schema: - type: string - - in: path - name: eventId - description: The event ID for the join event. - required: true - example: $abc123:example.org - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - sender: - type: string - description: The user ID of the joining member. - example: "@someone:example.org" - origin: - type: string - description: The name of the joining homeserver. - example: matrix.org - origin_server_ts: - type: integer - format: int64 - description: A timestamp added by the joining homeserver. - example: 1234567890 - type: - type: string - description: The value `m.room.member`. - example: m.room.member - state_key: - type: string - description: The user ID of the joining member. - example: "@someone:example.org" - content: - type: object - title: Membership Event Content - description: The content of the event. - example: - membership: join - properties: - membership: - type: string - description: The value `join`. - example: join - join_authorised_via_users_server: - type: string - x-addedInMatrixVersion: "1.2" - description: |- - Required if the room is [restricted](/client-server-api/#restricted-rooms) - and is joining through one of the conditions available. If the - user is responding to an invite, this is not required. - - An arbitrary user ID belonging to the resident server in - the room being joined that is able to issue invites to other - users. This is used in later validation of the auth rules for - the `m.room.member` event. - - The resident server which owns the provided user ID must have a - valid signature on the event. If the resident server is receiving - the `/send_join` request, the signature must be added before sending - or persisting the event to other servers. - required: - - membership - required: - - state_key - - sender - - origin - - origin_server_ts - - type - - content - required: true - responses: - "200": - description: The join event has been accepted into the room. - content: - application/json: - schema: - type: array - minItems: 2 - maxItems: 2 - items: - anyOf: - - type: integer - description: The value `200`. - example: 200 - - type: object - title: Room State - description: The state for the room. - properties: - auth_chain: - type: array - description: |- - The auth chain for the entire current room state prior to the join event. - - Note that events have a different format depending on the room version - check the - [room version specification](/rooms) for precise event formats. - items: - type: object - title: PDU - description: |- - The [PDUs](/server-server-api/#pdus) that make up the auth chain. The event format varies depending - on the room version - check the [room version specification](/rooms) for precise event formats. - state: - type: array - description: |- - The resolved current room state prior to the join event. - - The event format varies depending on the room version - check the [room version specification](/rooms) - for precise event formats. - items: - type: object - title: PDU - description: |- - The [PDUs](/server-server-api/#pdus) for the fully resolved state of the room. The event format varies depending - on the room version - check the [room version specification](/rooms) for precise event formats. - required: - - auth_chain - - state - examples: - response: - value: [ - 200, - { - "auth_chain": [ - { - "$ref": "examples/minimal_pdu.json" - } - ], - "state": [ - { - "$ref": "examples/minimal_pdu.json" - } - ], - "event": { - "$ref": "examples/pdu_v4_join_membership.json" - } - } - ] - "400": - description: |- - The request is invalid in some way. - content: - application/json: - schema: - $ref: ../client-server/definitions/errors/error.yaml - examples: - response: - value: { - "errcode": "M_INVALID_PARAM", - "error": "Not a join event." - } - "403": - description: |- - The room that the joining server is attempting to join does not permit the user - to join. - content: - application/json: - schema: - $ref: ../client-server/definitions/errors/error.yaml - examples: - response: - value: { - "errcode": "M_FORBIDDEN", - "error": "You are not invited to this room" - } servers: - url: "{protocol}://{hostname}{basePath}" variables: diff --git a/data/api/server-server/joins-v2.yaml b/data/api/server-server/joins-v2.yaml index c37964b2..264cbedf 100644 --- a/data/api/server-server/joins-v2.yaml +++ b/data/api/server-server/joins-v2.yaml @@ -22,15 +22,6 @@ paths: put: summary: Submit a signed join event to a resident server description: |- - **Note:** - This API is nearly identical to the v1 API with the - exception of the response format being fixed. - - This endpoint is preferred over the v1 API as it provides - a more standardised response format. Senders which receive - a 400, 404, or other status code which indicates this endpoint - is not available should retry using the v1 API instead. - Submits a signed join event to the resident server for it to accept it into the room's graph. Note that events have a different format depending on the room version - check diff --git a/data/api/server-server/leaving-v1.yaml b/data/api/server-server/leaving-v1.yaml index 16ba2262..95f3fffc 100644 --- a/data/api/server-server/leaving-v1.yaml +++ b/data/api/server-server/leaving-v1.yaml @@ -149,139 +149,6 @@ paths: "errcode": "M_FORBIDDEN", "error": "User is not in the room." } - "/send_leave/{roomId}/{eventId}": - put: - deprecated: true - summary: Submit a signed leave event to a resident server - description: |- - **Note:** - Servers should instead prefer to use the v2 `/send_leave` endpoint. - - Submits a signed leave event to the resident server for it - to accept it into the room's graph. Note that events have - a different format depending on the room version - check - the [room version specification](/rooms) for precise event formats. - **The request and response body here describe the common - event fields in more detail and may be missing other required - fields for a PDU.** - - The receiving server MUST apply certain validation before accepting the event. - A specific error code is not mandated, but servers SHOULD return `M_INVALID_PARAM` if: - - * The leave event fails a [signature check](/server-server-api/#validating-hashes-and-signatures-on-received-events). - * The event type is not `m.room.member`. - * The `membership` field inside the event content is not `leave`. - * The event sender is not a user ID on the origin server. - * The `state_key` is not equal to the `sender`. - operationId: sendLeaveV1 - security: - - signedRequest: [] - parameters: - - in: path - name: roomId - description: The room ID that is about to be left. - required: true - example: "!abc123:matrix.org" - schema: - type: string - - in: path - name: eventId - description: The event ID for the leave event. - required: true - example: $abc123:example.org - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - sender: - type: string - description: The user ID of the leaving member. - example: "@someone:example.org" - origin: - type: string - description: The name of the leaving homeserver. - example: matrix.org - origin_server_ts: - type: integer - format: int64 - description: A timestamp added by the leaving homeserver. - example: 1234567890 - type: - type: string - description: The value `m.room.member`. - example: m.room.member - state_key: - type: string - description: The user ID of the leaving member. - example: "@someone:example.org" - content: - type: object - title: Membership Event Content - description: The content of the event. - example: - membership: leave - properties: - membership: - type: string - description: The value `leave`. - example: leave - required: - - membership - depth: - type: integer - description: This field must be present but is ignored; it may be 0. - example: 12 - required: - - state_key - - sender - - origin - - origin_server_ts - - type - - depth - - content - required: true - responses: - "200": - description: |- - An empty response to indicate the event was accepted into the graph by - the receiving homeserver. - content: - application/json: - schema: - type: array - minItems: 2 - maxItems: 2 - items: - anyOf: - - type: integer - description: The value `200`. - example: 200 - - type: object - title: Empty Object - description: An empty object. - examples: - response: - value: [ - 200, - {} - ] - "400": - description: |- - The request is invalid in some way. - content: - application/json: - schema: - $ref: ../client-server/definitions/errors/error.yaml - examples: - response: - value: { - "errcode": "M_INVALID_PARAM", - "error": "Not a leave event." - } servers: - url: "{protocol}://{hostname}{basePath}" variables: diff --git a/data/api/server-server/leaving-v2.yaml b/data/api/server-server/leaving-v2.yaml index 15fbad75..6447b4bc 100644 --- a/data/api/server-server/leaving-v2.yaml +++ b/data/api/server-server/leaving-v2.yaml @@ -22,15 +22,6 @@ paths: put: summary: Submit a signed leave event to a resident server description: |- - **Note:** - This API is nearly identical to the v1 API with the - exception of the response format being fixed. - - This endpoint is preferred over the v1 API as it provides - a more standardised response format. Senders which receive - a 400, 404, or other status code which indicates this endpoint - is not available should retry using the v1 API instead. - Submits a signed leave event to the resident server for it to accept it into the room's graph. Note that events have a different format depending on the room version - check