docs-matrix-spec/data/event-schemas/schema/m.room.join_rules.yaml
Travis Ralston f14e18131b
Specify room version 10: knock_restricted and int power levels (#1099)
* Clarification on historical power level handling

* Revert "Clarification on historical power level handling"

This reverts commit f443b3d5a9afac3095b14a72ec471ba06f4cc78b.

* Clean up

* Let us try this again not using VS Code

* Markdown is full of mysteries

* Move stringy power levels to room versions

* Describe range

* Fix minor issues with previous room version stuff

* Copy/paste v9 into v10

* Describe deprecated formatting

* Paste unmodified auth rules from v8 into v10

* Move 9.1 to 9.3, add 9.1 and 9.2 for integer enforcement

* Add knock_restricted to v10 auth

* Misc cleanup and clarification for fragments

* Describe `knock_restricted` client changes

* Changelogs

* spelling

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Apply code review suggestions manually

* Fix v9 redactions

* Fix auth rules clarity issues

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Remove false integer requirements

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2022-06-08 15:22:47 -06:00

73 lines
3 KiB
YAML

---
allOf:
- $ref: core-event-schema/state_event.yaml
description: |
A room may have one of the following designations:
* `public` - anyone can join the room without any prior action.
* `invite` - a user must first receive an invite from someone already in the room
in order to join.
* `knock` - a user can request an invite to the room. They can be allowed (invited)
or denied (kicked/banned) access. Otherwise, users need to be invited in. Only
available in rooms [which support knocking](/rooms/#feature-matrix).
* `restricted` - anyone able to satisfy at least one of the allow conditions is
able to join the room without prior action. Otherwise, an invite is required.
Only available in rooms [which support the join rule](/rooms/#feature-matrix).
* `knock_restricted` - a user can request an invite using the same functions offered
by the `knock` join rule, or can attempt to join having satisfied an allow condition
per the `restricted` join rule. Only available in rooms
[which support the join rule](/rooms/#feature-matrix).
* `private` - reserved without implementation. No significant meaning.
properties:
content:
properties:
join_rule:
description: The type of rules used for users wishing to join this room.
enum:
- public
- knock
- invite
- private
- restricted
type: string
allow:
x-addedInMatrixVersion: "1.2"
description: |-
For `restricted` rooms, the conditions the user will be tested against. The
user needs only to satisfy one of the conditions to join the `restricted`
room. If the user fails to meet any condition, or the condition is unable
to be confirmed as satisfied, then the user requires an invite to join the
room. Improper or no `allow` conditions on a `restricted` join rule imply
the room is effectively invite-only (no conditions can be satisfied).
type: array
items:
type: object
title: AllowCondition
properties:
type:
type: string
description: |-
The type of condition:
* `m.room_membership` - the user satisfies the condition if they are
joined to the referenced room.
enum: ['m.room_membership']
room_id:
type: string
description: |-
Required if `type` is `m.room_membership`. The room ID to check the
user's membership against. If the user is joined to this room, they
satisfy the condition and thus are permitted to join the `restricted`
room.
required: ['type']
required:
- join_rule
type: object
state_key:
description: A zero-length string.
pattern: '^$'
type: string
type:
enum:
- m.room.join_rules
type: string
title: Describes how users are allowed to join the room.
type: object