mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 13:04:10 +01:00
Extend /v2/send_join to handle omit_members
Per MSC3706
This commit is contained in:
parent
d5b09604b3
commit
8a18446d54
1
changelogs/server_server/newsfragments/1391.feature
Normal file
1
changelogs/server_server/newsfragments/1391.feature
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Extend `/_matrix/federation/v2/send_join` to allow omitting membership events, per [MSC3706](https://github.com/matrix-org/matrix-doc/pull/3706).
|
||||||
|
|
@ -65,6 +65,14 @@ paths:
|
||||||
description: The event ID for the join event.
|
description: The event ID for the join event.
|
||||||
required: true
|
required: true
|
||||||
x-example: "$abc123:example.org"
|
x-example: "$abc123:example.org"
|
||||||
|
- in: query
|
||||||
|
name: omit_members
|
||||||
|
type: boolean
|
||||||
|
description: |-
|
||||||
|
If `true`, indicates that that calling server can accept a reduced
|
||||||
|
response, in which membership events are omitted from `state` and
|
||||||
|
redundant events are omitted from `auth_chain`.
|
||||||
|
x-addedInMatrixVersion: "1.6"
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
type: object
|
type: object
|
||||||
|
|
@ -191,38 +199,52 @@ paths:
|
||||||
origin:
|
origin:
|
||||||
type: string
|
type: string
|
||||||
description: The resident server's DNS name.
|
description: The resident server's DNS name.
|
||||||
|
members_omitted:
|
||||||
|
type: boolean
|
||||||
|
description: "`true` if `m.room.member` events have been omitted from `state`."
|
||||||
|
x-addedInMatrixVersion: "1.6"
|
||||||
auth_chain:
|
auth_chain:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
The auth chain for the entire current room state prior to the join event.
|
All events in the auth chain for the new join event, as well
|
||||||
|
as those in the auth chains for any events returned in
|
||||||
|
`state`.
|
||||||
|
|
||||||
|
If the `omit_members` query parameter was set to `true`, then
|
||||||
|
any events that are returned in `state` may be omitted from
|
||||||
|
`auth_chain`, whether or not membership events are omitted
|
||||||
|
from `state`.
|
||||||
|
|
||||||
Note that events have a different format depending on the room version - check the
|
Note that events have a different format depending on the room version - check the
|
||||||
[room version specification](/rooms) for precise event formats.
|
[room version specification](/rooms) for precise event formats.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
title: PDU
|
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.
|
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties: {}
|
properties: {}
|
||||||
|
x-changedInMatrixVersion:
|
||||||
|
"1.6": |-
|
||||||
|
reworded to include only consider state events returned in
|
||||||
|
`state`, and to allow elision of redundant events.
|
||||||
state:
|
state:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
The resolved current room state prior to the join event.
|
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)
|
If the request had `omit_members` set to `true`, events of
|
||||||
for precise event formats.
|
type `m.room.member` may be omitted from the response to
|
||||||
|
reduce the size of the response. If this is done,
|
||||||
|
`members_omitted` must be set to `true`.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
title: PDU
|
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.
|
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties: {}
|
properties: {}
|
||||||
|
x-changedInMatrixVersion:
|
||||||
|
"1.6": |-
|
||||||
|
permit omission of membership events.
|
||||||
event:
|
event:
|
||||||
type: object
|
type: object
|
||||||
title: SignedMembershipEvent
|
title: SignedMembershipEvent
|
||||||
|
|
@ -231,11 +253,21 @@ paths:
|
||||||
Required if the room version [supports restricted join rules](/rooms/#feature-matrix). The signed
|
Required if the room version [supports restricted join rules](/rooms/#feature-matrix). The signed
|
||||||
copy of the membership event sent to other servers by the resident server, including the resident
|
copy of the membership event sent to other servers by the resident server, including the resident
|
||||||
server's signature.
|
server's signature.
|
||||||
|
servers_in_room:
|
||||||
|
type: array
|
||||||
|
description: |-
|
||||||
|
**Required** if `members_omitted` is true.
|
||||||
|
|
||||||
|
A list of the servers active in the room (ie, those with joined members) before the join.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
required: ["auth_chain", "state", "origin"]
|
required: ["auth_chain", "state", "origin"]
|
||||||
examples:
|
examples:
|
||||||
application/json: {
|
application/json: {
|
||||||
"origin": "matrix.org",
|
"origin": "matrix.org",
|
||||||
"auth_chain": [{"$ref": "examples/minimal_pdu.json"}],
|
"auth_chain": [{"$ref": "examples/minimal_pdu.json"}],
|
||||||
"state": [{"$ref": "examples/minimal_pdu.json"}],
|
"state": [{"$ref": "examples/minimal_pdu.json"}],
|
||||||
"event": {"$ref": "examples/pdu_v4_join_membership.json"}
|
"event": {"$ref": "examples/pdu_v4_join_membership.json"},
|
||||||
|
"members_omitted": true,
|
||||||
|
"servers_in_room": ["matrix.org", "example.com"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue