|
|
@ -61,7 +61,11 @@ paths:
|
|
|
|
responses:
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
200:
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
A template to be used for the rest of the `Joining Rooms`_ handshake.
|
|
|
|
A template to be used for the rest of the `Joining Rooms`_ handshake. Note that
|
|
|
|
|
|
|
|
events have a different version depending on the room version - check the
|
|
|
|
|
|
|
|
`room version specification`_ for precise event formats. **The response body
|
|
|
|
|
|
|
|
here describes the common event fields in more detail and may be missing other
|
|
|
|
|
|
|
|
required fields for a PDU.**
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
properties:
|
|
|
@ -72,96 +76,61 @@ paths:
|
|
|
|
the room version is assumed to be either "1" or "2".
|
|
|
|
the room version is assumed to be either "1" or "2".
|
|
|
|
example: "2"
|
|
|
|
example: "2"
|
|
|
|
event:
|
|
|
|
event:
|
|
|
|
allOf:
|
|
|
|
description: |-
|
|
|
|
- $ref: "definitions/unsigned_pdu.yaml"
|
|
|
|
An unsigned template event. Note that events have a different version
|
|
|
|
- description: |-
|
|
|
|
depending on the room version - check the `room version specification`_
|
|
|
|
An unsigned template event.
|
|
|
|
for precise event formats.
|
|
|
|
|
|
|
|
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 resident homeserver.
|
|
|
|
|
|
|
|
example: "matrix.org"
|
|
|
|
|
|
|
|
origin_server_ts:
|
|
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
|
|
format: int64
|
|
|
|
|
|
|
|
description: A timestamp added by the resident 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
|
|
|
|
type: object
|
|
|
|
|
|
|
|
title: Membership Event Content
|
|
|
|
|
|
|
|
description: The content of the event.
|
|
|
|
|
|
|
|
example: {"membership": "join"}
|
|
|
|
properties:
|
|
|
|
properties:
|
|
|
|
# Note: we override a bunch of parameters to change their descriptions
|
|
|
|
membership:
|
|
|
|
sender:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The user ID of the joining member.
|
|
|
|
|
|
|
|
example: "@someone:example.org"
|
|
|
|
|
|
|
|
origin:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The name of the resident homeserver.
|
|
|
|
|
|
|
|
example: "matrix.org"
|
|
|
|
|
|
|
|
origin_server_ts:
|
|
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
|
|
format: int64
|
|
|
|
|
|
|
|
description: A timestamp added by the resident 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"
|
|
|
|
|
|
|
|
required: ['membership']
|
|
|
|
|
|
|
|
depth:
|
|
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
|
|
description: This field must be present but is ignored; it may be 0.
|
|
|
|
|
|
|
|
example: 12
|
|
|
|
|
|
|
|
auth_events:
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
``m.room.create``, ``m.room.power_levels``, and ``m.room.join_rules``
|
|
|
|
|
|
|
|
events.
|
|
|
|
|
|
|
|
items:
|
|
|
|
|
|
|
|
type: array
|
|
|
|
|
|
|
|
maxItems: 2
|
|
|
|
|
|
|
|
minItems: 2
|
|
|
|
|
|
|
|
items:
|
|
|
|
|
|
|
|
- type: string
|
|
|
|
|
|
|
|
title: Event ID
|
|
|
|
|
|
|
|
example: "$abc123:matrix.org"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
|
|
|
|
title: Event Hash
|
|
|
|
|
|
|
|
example: {
|
|
|
|
|
|
|
|
"sha256": "abase64encodedsha256hashshouldbe43byteslong"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
sha256:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The event hash.
|
|
|
|
|
|
|
|
example: abase64encodedsha256hashshouldbe43byteslong
|
|
|
|
|
|
|
|
required: ['sha256']
|
|
|
|
|
|
|
|
redacts:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: Not used.
|
|
|
|
description: The value ``join``.
|
|
|
|
required:
|
|
|
|
example: "join"
|
|
|
|
# Every other field is already flagged as required by the $ref
|
|
|
|
required: ['membership']
|
|
|
|
- state_key
|
|
|
|
required:
|
|
|
|
|
|
|
|
- state_key
|
|
|
|
|
|
|
|
- origin
|
|
|
|
|
|
|
|
- origin_server_ts
|
|
|
|
|
|
|
|
- type
|
|
|
|
|
|
|
|
- state_key
|
|
|
|
|
|
|
|
- content
|
|
|
|
examples:
|
|
|
|
examples:
|
|
|
|
application/json: {
|
|
|
|
application/json: {
|
|
|
|
"room_version": "2",
|
|
|
|
"room_version": "2",
|
|
|
|
"event": {
|
|
|
|
"event": {
|
|
|
|
"$ref": "examples/unsigned_pdu.json",
|
|
|
|
"$ref": "examples/minimal_pdu.json",
|
|
|
|
"type": "m.room.member",
|
|
|
|
"type": "m.room.member",
|
|
|
|
"state_key": "@someone:example.org",
|
|
|
|
"state_key": "@someone:example.org",
|
|
|
|
"content": {
|
|
|
|
"content": {
|
|
|
|
"membership": "join"
|
|
|
|
"membership": "join"
|
|
|
|
},
|
|
|
|
}
|
|
|
|
"auth_events": [
|
|
|
|
|
|
|
|
["$room_cre4te_3vent:matrix.org", {"sha256": "abase64encodedsha256hashshouldbe43byteslong"}],
|
|
|
|
|
|
|
|
["$room_j0in_rul3s_3vent:matrix.org", {"sha256": "abase64encodedsha256hashshouldbe43byteslong"}],
|
|
|
|
|
|
|
|
["$room_p0wer_l3vels_3vent:matrix.org", {"sha256": "abase64encodedsha256hashshouldbe43byteslong"}]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
400:
|
|
|
|
400:
|
|
|
@ -193,7 +162,12 @@ paths:
|
|
|
|
summary: Submit a signed join event to a resident server
|
|
|
|
summary: Submit a signed join event to a resident server
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
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.
|
|
|
|
to accept it into the room's graph. Note that events have
|
|
|
|
|
|
|
|
a different version depending on the room version - check
|
|
|
|
|
|
|
|
the `room version specification`_ for precise event formats.
|
|
|
|
|
|
|
|
**The request and response body here describes the common
|
|
|
|
|
|
|
|
event fields in more detail and may be missing other required
|
|
|
|
|
|
|
|
fields for a PDU.**
|
|
|
|
operationId: sendJoin
|
|
|
|
operationId: sendJoin
|
|
|
|
security:
|
|
|
|
security:
|
|
|
|
- signedRequest: []
|
|
|
|
- signedRequest: []
|
|
|
@ -215,79 +189,50 @@ paths:
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
allOf:
|
|
|
|
type: object
|
|
|
|
- $ref: "definitions/pdu.yaml"
|
|
|
|
properties:
|
|
|
|
- type: object
|
|
|
|
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:
|
|
|
|
properties:
|
|
|
|
# Note: we override a bunch of parameters to change their descriptions
|
|
|
|
membership:
|
|
|
|
sender:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: The user ID of the joining member.
|
|
|
|
description: The value ``join``.
|
|
|
|
example: "@someone:example.org"
|
|
|
|
example: "join"
|
|
|
|
origin:
|
|
|
|
required: ['membership']
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
description: The name of the joining homeserver.
|
|
|
|
- state_key
|
|
|
|
example: "matrix.org"
|
|
|
|
- sender
|
|
|
|
origin_server_ts:
|
|
|
|
- origin
|
|
|
|
type: integer
|
|
|
|
- origin_server_ts
|
|
|
|
format: int64
|
|
|
|
- type
|
|
|
|
description: A timestamp added by the joining homeserver.
|
|
|
|
- state_key
|
|
|
|
example: 1234567890
|
|
|
|
- content
|
|
|
|
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"
|
|
|
|
|
|
|
|
required: ['membership']
|
|
|
|
|
|
|
|
depth:
|
|
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
|
|
description: This field must be present but is ignored; it may be 0.
|
|
|
|
|
|
|
|
example: 12
|
|
|
|
|
|
|
|
auth_events:
|
|
|
|
|
|
|
|
type: array
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
An event reference list containing the authorization events that would
|
|
|
|
|
|
|
|
allow the member to join the room.
|
|
|
|
|
|
|
|
items:
|
|
|
|
|
|
|
|
type: array
|
|
|
|
|
|
|
|
maxItems: 2
|
|
|
|
|
|
|
|
minItems: 2
|
|
|
|
|
|
|
|
items:
|
|
|
|
|
|
|
|
- type: string
|
|
|
|
|
|
|
|
title: Event ID
|
|
|
|
|
|
|
|
example: "$abc123:matrix.org"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
|
|
|
|
title: Event Hash
|
|
|
|
|
|
|
|
example: {
|
|
|
|
|
|
|
|
"sha256": "abase64encodedsha256hashshouldbe43byteslong"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
sha256:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The event hash.
|
|
|
|
|
|
|
|
example: abase64encodedsha256hashshouldbe43byteslong
|
|
|
|
|
|
|
|
required: ['sha256']
|
|
|
|
|
|
|
|
redacts:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: Not used.
|
|
|
|
|
|
|
|
required:
|
|
|
|
|
|
|
|
# Every other field is already flagged as required by the $ref
|
|
|
|
|
|
|
|
- state_key
|
|
|
|
|
|
|
|
example: {
|
|
|
|
example: {
|
|
|
|
"$ref": "examples/pdu.json",
|
|
|
|
"$ref": "examples/minimal_pdu.json",
|
|
|
|
"type": "m.room.member",
|
|
|
|
"type": "m.room.member",
|
|
|
|
"state_key": "@someone:example.org",
|
|
|
|
"state_key": "@someone:example.org",
|
|
|
|
"content": {
|
|
|
|
"content": {
|
|
|
@ -315,11 +260,20 @@ paths:
|
|
|
|
description: The resident server's DNS name.
|
|
|
|
description: The resident server's DNS name.
|
|
|
|
auth_chain:
|
|
|
|
auth_chain:
|
|
|
|
type: array
|
|
|
|
type: array
|
|
|
|
description: The auth chain.
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The auth chain. Note that events have a different version depending on
|
|
|
|
|
|
|
|
the room version - check the `room version specification`_ for precise
|
|
|
|
|
|
|
|
event formats.
|
|
|
|
items:
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
schema:
|
|
|
|
title: PDU
|
|
|
|
$ref: "definitions/pdu.yaml"
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The `PDUs <#pdus>`_ contained in the auth chain. The event format
|
|
|
|
|
|
|
|
varies depending on the room version - check the `room version specification`_
|
|
|
|
|
|
|
|
for precise event formats.
|
|
|
|
|
|
|
|
properties: []
|
|
|
|
|
|
|
|
example:
|
|
|
|
|
|
|
|
$ref: "examples/minimal_pdu.json"
|
|
|
|
state:
|
|
|
|
state:
|
|
|
|
type: array
|
|
|
|
type: array
|
|
|
|
description: The room state.
|
|
|
|
description: The room state.
|
|
|
@ -333,7 +287,7 @@ paths:
|
|
|
|
200,
|
|
|
|
200,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"origin": "matrix.org",
|
|
|
|
"origin": "matrix.org",
|
|
|
|
"auth_chain": [{"$ref": "examples/pdu.json"}],
|
|
|
|
"auth_chain": [{"$ref": "examples/minimal_pdu.json"}],
|
|
|
|
"state": [{"$ref": "examples/pdu.json"}]
|
|
|
|
"state": [{"$ref": "examples/minimal_pdu.json"}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|