mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-23 19:24:10 +02:00
Compare commits
3 commits
f8aa48f237
...
68e982b0b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68e982b0b7 | ||
|
|
967b54195c | ||
|
|
282a44f5c5 |
|
|
@ -0,0 +1 @@
|
|||
Clarify the special casing of membership events and redactions in power levels.
|
||||
|
|
@ -0,0 +1 @@
|
|||
M_RESOURCE_LIMIT_EXCEEDED is now listed as a common error code.
|
||||
|
|
@ -136,6 +136,17 @@ code if the endpoint is implemented, but the incorrect HTTP method is used.
|
|||
{{% added-in v="1.17" %}} The device ID supplied by the application service does
|
||||
not belong to the user ID during [identity assertion](/application-service-api/#identity-assertion).
|
||||
|
||||
`M_RESOURCE_LIMIT_EXCEEDED`
|
||||
The request cannot be completed because the homeserver has reached a
|
||||
resource limit imposed on it. For example, a homeserver held in a shared
|
||||
hosting environment may reach a resource limit if it starts using too
|
||||
much memory or disk space. The error MUST have an `admin_contact` field
|
||||
to provide the user receiving the error a place to reach out to.
|
||||
Typically, this error will appear on routes which attempt to modify
|
||||
state (e.g.: sending messages, account data, etc) and not routes which
|
||||
only read state (e.g.: [`/sync`](#get_matrixclientv3sync),
|
||||
[`/user/{userId}/account_data/{type}`](#get_matrixclientv3useruseridaccount_datatype), etc).
|
||||
|
||||
`M_UNKNOWN`
|
||||
An unknown error has occurred.
|
||||
|
||||
|
|
@ -221,17 +232,6 @@ The request or entity was too large.
|
|||
The resource being requested is reserved by an application service, or
|
||||
the application service making the request has not created the resource.
|
||||
|
||||
`M_RESOURCE_LIMIT_EXCEEDED`
|
||||
The request cannot be completed because the homeserver has reached a
|
||||
resource limit imposed on it. For example, a homeserver held in a shared
|
||||
hosting environment may reach a resource limit if it starts using too
|
||||
much memory or disk space. The error MUST have an `admin_contact` field
|
||||
to provide the user receiving the error a place to reach out to.
|
||||
Typically, this error will appear on routes which attempt to modify
|
||||
state (e.g.: sending messages, account data, etc) and not routes which
|
||||
only read state (e.g.: [`/sync`](#get_matrixclientv3sync),
|
||||
[`/user/{userId}/account_data/{type}`](#get_matrixclientv3useruseridaccount_datatype), etc).
|
||||
|
||||
`M_CANNOT_LEAVE_SERVER_NOTICE_ROOM`
|
||||
The user is unable to reject an invite to join the server notices room.
|
||||
See the [Server Notices](#server-notices) module for more information.
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ paths:
|
|||
This cannot be undone.
|
||||
|
||||
Any user with a power level greater than or equal to the `m.room.redaction`
|
||||
event power level may send redaction events in the room. If the user's power
|
||||
level is also greater than or equal to the `redact` power level of the room,
|
||||
the user may redact events sent by other users.
|
||||
event power level may send redactions for their own events in the room. If
|
||||
the user's power level is also greater than or equal to the `redact` power
|
||||
level of the room, the user may redact events sent by other users.
|
||||
|
||||
Server administrators may redact events sent by users on their server.
|
||||
operationId: redactEvent
|
||||
|
|
|
|||
|
|
@ -13,24 +13,34 @@ description: |-
|
|||
0. If the room contains no `m.room.power_levels` event, the room's creator has
|
||||
a power level of 100, and all other users have a power level of 0.
|
||||
|
||||
The level required to send a certain event is governed by `events`,
|
||||
`state_default` and `events_default`. If an event type is specified in
|
||||
`events`, then the user must have at least the level specified in order to
|
||||
send that event. If the event type is not supplied, it defaults to
|
||||
`events_default` for Message Events and `state_default` for State
|
||||
Events.
|
||||
Except for membership events and redactions, the level required to
|
||||
send a certain event is governed purely by `events`, `state_default`
|
||||
and `events_default`. If an event type is specified in `events`, then
|
||||
the user must have at least the level specified in order to send that
|
||||
event. If the event type is not supplied, it defaults to `events_default`
|
||||
for message events and `state_default` for state events.
|
||||
|
||||
If there is no `state_default` in the `m.room.power_levels` event, or
|
||||
there is no `m.room.power_levels` event, the `state_default` is 50.
|
||||
If there is no `events_default` in the `m.room.power_levels` event,
|
||||
or there is no `m.room.power_levels` event, the `events_default` is 0.
|
||||
|
||||
The power level required to invite a user to the room, kick a user from the
|
||||
room, ban a user from the room, or redact an event sent by another user, is
|
||||
defined by `invite`, `kick`, `ban`, and `redact`, respectively. The levels
|
||||
for `kick`, `ban` and `redact` default to 50 if they are not specified in the
|
||||
`m.room.power_levels` event, or if the room contains no `m.room.power_levels`
|
||||
event. `invite` defaults to 0 in either case.
|
||||
Membership events are not subject to `events`, `events_default`, or
|
||||
`state_default`. Instead, the power level required to invite a user
|
||||
to the room, kick a user from the room, or ban a user from the room
|
||||
is defined by `invite`, `kick`, and `ban`, respectively. The levels
|
||||
for `kick` and `ban` default to 50 if they are not specified in the
|
||||
`m.room.power_levels` event, or if the room contains no
|
||||
`m.room.power_levels` event. `invite` defaults to 0 in either case.
|
||||
Other membership values are handled during event authorization. See
|
||||
the authorization rules in [room versions](/rooms) for further details.
|
||||
|
||||
For redactions of a user's own events, the required power level is
|
||||
determined by the `m.room.redaction` event power level, as per `events`
|
||||
and `events_default`. The power level required to redact an event sent
|
||||
by another user is _additionally_ governed by `redact`. The level for
|
||||
`redact` defaults to 50 if it is not specified in the `m.room.power_levels`
|
||||
event, or if the room contains no `m.room.power_levels` event.
|
||||
|
||||
**Note:**
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue