Skip to content

Commit

Permalink
Clarify the power levels integer range
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Becker <j.becker@famedly.com>
  • Loading branch information
johannescpk committed Jul 18, 2022
1 parent ead4375 commit 10f9fc0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions data/event-schemas/schema/m.room.power_levels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
This event specifies the minimum level a user must have in order to perform a
certain action. It also specifies the levels of each user in the room.
The allowed range of power levels is specified by the [Canonical JSON specification](https://spec.matrix.org/v1.3/appendices/#canonical-json).
If a `user_id` is in the `users` list, then that `user_id` has the
associated power level. Otherwise they have the default level
`users_default`. If `users_default` is not supplied, it is assumed to be
Expand Down Expand Up @@ -56,8 +58,8 @@ properties:
type: object
events_default:
description: |-
The default level required to send message events. Can be
overridden by the `events` key. Defaults to 0 if unspecified.
The default level required to send message events. Can be
overridden by the `events` key. Defaults to 0 if unspecified.
type: integer
invite:
description: The level required to invite a user. Defaults to 0 if unspecified.
Expand All @@ -70,8 +72,8 @@ properties:
type: integer
state_default:
description: |-
The default level required to send state events. Can be overridden
by the `events` key. Defaults to 50 if unspecified.
The default level required to send state events. Can be overridden
by the `events` key. Defaults to 50 if unspecified.
type: integer
users:
additionalProperties:
Expand All @@ -81,9 +83,9 @@ properties:
type: object
users_default:
description: |-
The default power level for every user in the room, unless their
`user_id` is mentioned in the `users` key. Defaults to 0 if
unspecified.
The default power level for every user in the room, unless their
`user_id` is mentioned in the `users` key. Defaults to 0 if
unspecified.
type: integer
notifications:
properties:
Expand All @@ -93,14 +95,14 @@ properties:
additionalProperties:
type: integer
description: |-
The power level requirements for specific notification types.
This is a mapping from `key` to power level for that notifications key.
The power level requirements for specific notification types.
This is a mapping from `key` to power level for that notifications key.
title: Notifications
type: object
type: object
state_key:
description: A zero-length string.
pattern: '^$'
pattern: "^$"
type: string
type:
enum:
Expand Down

0 comments on commit 10f9fc0

Please sign in to comment.