|
|
@ -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 format 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,13 +76,13 @@ 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 format
|
|
|
|
- description: |-
|
|
|
|
depending on the room version - check the `room version specification`_
|
|
|
|
An unsigned template event.
|
|
|
|
for precise event formats.
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
|
|
|
|
title: Event Template
|
|
|
|
properties:
|
|
|
|
properties:
|
|
|
|
# Note: we override a bunch of parameters to change their descriptions
|
|
|
|
|
|
|
|
sender:
|
|
|
|
sender:
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: The user ID of the joining member.
|
|
|
|
description: The user ID of the joining member.
|
|
|
@ -111,57 +115,26 @@ paths:
|
|
|
|
description: The value ``join``.
|
|
|
|
description: The value ``join``.
|
|
|
|
example: "join"
|
|
|
|
example: "join"
|
|
|
|
required: ['membership']
|
|
|
|
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
|
|
|
|
|
|
|
|
description: Not used.
|
|
|
|
|
|
|
|
required:
|
|
|
|
required:
|
|
|
|
# Every other field is already flagged as required by the $ref
|
|
|
|
|
|
|
|
- state_key
|
|
|
|
- state_key
|
|
|
|
|
|
|
|
- origin
|
|
|
|
|
|
|
|
- origin_server_ts
|
|
|
|
|
|
|
|
- type
|
|
|
|
|
|
|
|
- content
|
|
|
|
|
|
|
|
- sender
|
|
|
|
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",
|
|
|
|
|
|
|
|
"origin": "example.org",
|
|
|
|
|
|
|
|
"origin_server_ts": 1549041175876,
|
|
|
|
|
|
|
|
"sender": "@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 +166,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 format 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,11 +193,8 @@ paths:
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
allOf:
|
|
|
|
type: object
|
|
|
|
- $ref: "definitions/pdu.yaml"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
|
|
|
|
properties:
|
|
|
|
properties:
|
|
|
|
# Note: we override a bunch of parameters to change their descriptions
|
|
|
|
|
|
|
|
sender:
|
|
|
|
sender:
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: The user ID of the joining member.
|
|
|
|
description: The user ID of the joining member.
|
|
|
@ -252,44 +227,20 @@ paths:
|
|
|
|
description: The value ``join``.
|
|
|
|
description: The value ``join``.
|
|
|
|
example: "join"
|
|
|
|
example: "join"
|
|
|
|
required: ['membership']
|
|
|
|
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:
|
|
|
|
required:
|
|
|
|
# Every other field is already flagged as required by the $ref
|
|
|
|
|
|
|
|
- state_key
|
|
|
|
- state_key
|
|
|
|
|
|
|
|
- sender
|
|
|
|
|
|
|
|
- origin
|
|
|
|
|
|
|
|
- origin_server_ts
|
|
|
|
|
|
|
|
- type
|
|
|
|
|
|
|
|
- content
|
|
|
|
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",
|
|
|
|
|
|
|
|
"origin": "example.org",
|
|
|
|
|
|
|
|
"origin_server_ts": 1549041175876,
|
|
|
|
|
|
|
|
"sender": "@someone:example.org",
|
|
|
|
"content": {
|
|
|
|
"content": {
|
|
|
|
"membership": "join"
|
|
|
|
"membership": "join"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -315,25 +266,44 @@ 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 format depending on
|
|
|
|
|
|
|
|
the room version - check the `room version specification`_ for precise
|
|
|
|
|
|
|
|
event formats.
|
|
|
|
items:
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
|
|
|
|
title: PDU
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The `PDUs <#pdus>`_ that make up the auth chain. The event format varies depending
|
|
|
|
|
|
|
|
on the room version - check the `room version specification`_ for precise event formats.
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
$ref: "definitions/pdu.yaml"
|
|
|
|
type: object
|
|
|
|
|
|
|
|
properties: []
|
|
|
|
|
|
|
|
example:
|
|
|
|
|
|
|
|
$ref: "examples/minimal_pdu.json"
|
|
|
|
state:
|
|
|
|
state:
|
|
|
|
type: array
|
|
|
|
type: array
|
|
|
|
description: The room state.
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The room state. The event format varies depending on the room version -
|
|
|
|
|
|
|
|
check the `room version specification`_ for precise event formats.
|
|
|
|
items:
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
type: object
|
|
|
|
|
|
|
|
title: PDU
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The `PDUs <#pdus>`_ for the fully resolved state of the room. The event format varies depending
|
|
|
|
|
|
|
|
on the room version - check the `room version specification`_ for precise event formats.
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
$ref: "definitions/pdu.yaml"
|
|
|
|
type: object
|
|
|
|
|
|
|
|
properties: []
|
|
|
|
|
|
|
|
example:
|
|
|
|
|
|
|
|
$ref: "examples/minimal_pdu.json"
|
|
|
|
required: ["auth_chain", "state", "origin"]
|
|
|
|
required: ["auth_chain", "state", "origin"]
|
|
|
|
examples:
|
|
|
|
examples:
|
|
|
|
application/json: [
|
|
|
|
application/json: [
|
|
|
|
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"}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|