mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-06 19:34:10 +02:00
Merge 6ff54e3c7f into f62aa09e60
This commit is contained in:
commit
7e8b514b2d
1
changelogs/server_server/newsfragments/2319.removal
Normal file
1
changelogs/server_server/newsfragments/2319.removal
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Remove `/v1/send_join` and `/v1/send_leave`, as per [MSC4376](https://github.com/matrix-org/matrix-spec-proposals/pull/4376).
|
||||||
|
|
@ -223,171 +223,6 @@ paths:
|
||||||
"errcode": "M_NOT_FOUND",
|
"errcode": "M_NOT_FOUND",
|
||||||
"error": "Unknown room"
|
"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.**
|
|
||||||
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
servers:
|
servers:
|
||||||
- url: "{protocol}://{hostname}{basePath}"
|
- url: "{protocol}://{hostname}{basePath}"
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -403,4 +238,4 @@ servers:
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
signedRequest:
|
signedRequest:
|
||||||
$ref: definitions/security.yaml#/signedRequest
|
$ref: definitions/security.yaml#/signedRequest
|
||||||
|
|
@ -22,15 +22,6 @@ paths:
|
||||||
put:
|
put:
|
||||||
summary: Submit a signed join event to a resident server
|
summary: Submit a signed join event to a resident server
|
||||||
description: |-
|
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
|
Submits a signed join event to the resident server for it
|
||||||
to accept it into the room's graph. Note that events have
|
to accept it into the room's graph. Note that events have
|
||||||
a different format depending on the room version - check
|
a different format depending on the room version - check
|
||||||
|
|
|
||||||
|
|
@ -138,117 +138,6 @@ paths:
|
||||||
"errcode": "M_FORBIDDEN",
|
"errcode": "M_FORBIDDEN",
|
||||||
"error": "User is not in the room."
|
"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.**
|
|
||||||
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,
|
|
||||||
{}
|
|
||||||
]
|
|
||||||
servers:
|
servers:
|
||||||
- url: "{protocol}://{hostname}{basePath}"
|
- url: "{protocol}://{hostname}{basePath}"
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
|
|
@ -22,15 +22,6 @@ paths:
|
||||||
put:
|
put:
|
||||||
summary: Submit a signed leave event to a resident server
|
summary: Submit a signed leave event to a resident server
|
||||||
description: |-
|
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
|
Submits a signed leave event to the resident server for it
|
||||||
to accept it into the room's graph. Note that events have
|
to accept it into the room's graph. Note that events have
|
||||||
a different format depending on the room version - check
|
a different format depending on the room version - check
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue