mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-23 19:24:10 +02:00
Compare commits
5 commits
f276ff2c3d
...
cfe1b062d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfe1b062d1 | ||
|
|
fe5a195f4a | ||
|
|
2baca03e6b | ||
|
|
28d6707d5d | ||
|
|
c9face5050 |
1
changelogs/client_server/newsfragments/2311.feature
Normal file
1
changelogs/client_server/newsfragments/2311.feature
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
`/_matrix/client/v3/rooms/{roomId}/report` and `/_matrix/client/v3/rooms/{roomId}/report/{eventId}` may respond with HTTP 200 regardless of the reported subject's existence or add a random delay when generating responses as per [MSC4277](https://github.com/matrix-org/matrix-spec-proposals/pull/4277).
|
||||||
1
changelogs/client_server/newsfragments/2311.removal
Normal file
1
changelogs/client_server/newsfragments/2311.removal
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
The `score` request parameter on `/_matrix/client/v3/rooms/{roomId}/report/{eventId}` was removed as per [MSC4277](https://github.com/matrix-org/matrix-spec-proposals/pull/4277).
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Fix various typos throughout the specification. Contributed by @HarHarLinks.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Clarified attachment encryption to require secure generation of keys and hash verification.
|
||||||
1
changelogs/internal/newsfragments/2318.clarification
Normal file
1
changelogs/internal/newsfragments/2318.clarification
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Fix various typos throughout the specification. Contributed by @HarHarLinks.
|
||||||
1
changelogs/internal/newsfragments/2323.clarification
Normal file
1
changelogs/internal/newsfragments/2323.clarification
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Render error code sections as definition lists to improve readability.
|
||||||
|
|
@ -65,7 +65,7 @@ description = "Home of the Matrix specification for decentralised communication"
|
||||||
# Everything below this are Site Params
|
# Everything below this are Site Params
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
copyright = "The Matrix.org Foundation CIC"
|
copyright = "The Matrix.org Foundation C.I.C."
|
||||||
|
|
||||||
[params.version]
|
[params.version]
|
||||||
# must be one of "unstable", "current", "historical"
|
# must be one of "unstable", "current", "historical"
|
||||||
|
|
|
||||||
|
|
@ -94,50 +94,50 @@ request being made was invalid.
|
||||||
These error codes can be returned by any API endpoint:
|
These error codes can be returned by any API endpoint:
|
||||||
|
|
||||||
`M_FORBIDDEN`
|
`M_FORBIDDEN`
|
||||||
Forbidden access, e.g. joining a room without permission, failed login.
|
: Forbidden access, e.g. joining a room without permission, failed login.
|
||||||
|
|
||||||
`M_UNKNOWN_TOKEN`
|
`M_UNKNOWN_TOKEN`
|
||||||
The access or refresh token specified was not recognised.
|
: The access or refresh token specified was not recognised.
|
||||||
|
|
||||||
An additional response parameter, `soft_logout`, might be present on the
|
: An additional response parameter, `soft_logout`, might be present on the
|
||||||
response for 401 HTTP status codes. See [the soft logout
|
response for 401 HTTP status codes. See [the soft logout
|
||||||
section](#soft-logout) for more information.
|
section](#soft-logout) for more information.
|
||||||
|
|
||||||
`M_MISSING_TOKEN`
|
`M_MISSING_TOKEN`
|
||||||
No access token was specified for the request.
|
: No access token was specified for the request.
|
||||||
|
|
||||||
`M_USER_LOCKED`
|
`M_USER_LOCKED`
|
||||||
The account has been [locked](#account-locking) and cannot be used at this time.
|
: The account has been [locked](#account-locking) and cannot be used at this time.
|
||||||
|
|
||||||
`M_USER_SUSPENDED`
|
`M_USER_SUSPENDED`
|
||||||
The account has been [suspended](#account-suspension) and can only be used for
|
: The account has been [suspended](#account-suspension) and can only be used for
|
||||||
limited actions at this time.
|
limited actions at this time.
|
||||||
|
|
||||||
`M_BAD_JSON`
|
`M_BAD_JSON`
|
||||||
Request contained valid JSON, but it was malformed in some way, e.g.
|
: Request contained valid JSON, but it was malformed in some way, e.g.
|
||||||
missing required keys, invalid values for keys.
|
missing required keys, invalid values for keys.
|
||||||
|
|
||||||
`M_NOT_JSON`
|
`M_NOT_JSON`
|
||||||
Request did not contain valid JSON.
|
: Request did not contain valid JSON.
|
||||||
|
|
||||||
`M_NOT_FOUND`
|
`M_NOT_FOUND`
|
||||||
No resource was found for this request.
|
: No resource was found for this request.
|
||||||
|
|
||||||
`M_LIMIT_EXCEEDED`
|
`M_LIMIT_EXCEEDED`
|
||||||
Too many requests have been sent in a short period of time. Wait a while
|
: Too many requests have been sent in a short period of time. Wait a while
|
||||||
then try again. See [Rate limiting](#rate-limiting).
|
then try again. See [Rate limiting](#rate-limiting).
|
||||||
|
|
||||||
`M_UNRECOGNIZED`
|
`M_UNRECOGNIZED`
|
||||||
The server did not understand the request. This is expected to be returned with
|
: The server did not understand the request. This is expected to be returned with
|
||||||
a 404 HTTP status code if the endpoint is not implemented or a 405 HTTP status
|
a 404 HTTP status code if the endpoint is not implemented or a 405 HTTP status
|
||||||
code if the endpoint is implemented, but the incorrect HTTP method is used.
|
code if the endpoint is implemented, but the incorrect HTTP method is used.
|
||||||
|
|
||||||
`M_UNKNOWN_DEVICE`
|
`M_UNKNOWN_DEVICE`
|
||||||
{{% added-in v="1.17" %}} The device ID supplied by the application service does
|
: {{% 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).
|
not belong to the user ID during [identity assertion](/application-service-api/#identity-assertion).
|
||||||
|
|
||||||
`M_RESOURCE_LIMIT_EXCEEDED`
|
`M_RESOURCE_LIMIT_EXCEEDED`
|
||||||
The request cannot be completed because the homeserver has reached a
|
: The request cannot be completed because the homeserver has reached a
|
||||||
resource limit imposed on it. For example, a homeserver held in a shared
|
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
|
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
|
much memory or disk space. The error MUST have an `admin_contact` field
|
||||||
|
|
@ -148,7 +148,7 @@ only read state (e.g.: [`/sync`](#get_matrixclientv3sync),
|
||||||
[`/user/{userId}/account_data/{type}`](#get_matrixclientv3useruseridaccount_datatype), etc).
|
[`/user/{userId}/account_data/{type}`](#get_matrixclientv3useruseridaccount_datatype), etc).
|
||||||
|
|
||||||
`M_UNKNOWN`
|
`M_UNKNOWN`
|
||||||
An unknown error has occurred.
|
: An unknown error has occurred.
|
||||||
|
|
||||||
#### Other error codes
|
#### Other error codes
|
||||||
|
|
||||||
|
|
@ -157,90 +157,90 @@ The following error codes are specific to certain endpoints.
|
||||||
<!-- TODO: move them to the endpoints that return them -->
|
<!-- TODO: move them to the endpoints that return them -->
|
||||||
|
|
||||||
`M_UNAUTHORIZED`
|
`M_UNAUTHORIZED`
|
||||||
The request was not correctly authorized. Usually due to login failures.
|
: The request was not correctly authorized. Usually due to login failures.
|
||||||
|
|
||||||
`M_USER_DEACTIVATED`
|
`M_USER_DEACTIVATED`
|
||||||
The user ID associated with the request has been deactivated. Typically
|
: The user ID associated with the request has been deactivated. Typically
|
||||||
for endpoints that prove authentication, such as [`/login`](#get_matrixclientv3login).
|
for endpoints that prove authentication, such as [`/login`](#get_matrixclientv3login).
|
||||||
|
|
||||||
`M_USER_IN_USE`
|
`M_USER_IN_USE`
|
||||||
Encountered when trying to register a user ID which has been taken.
|
: Encountered when trying to register a user ID which has been taken.
|
||||||
|
|
||||||
`M_INVALID_USERNAME`
|
`M_INVALID_USERNAME`
|
||||||
Encountered when trying to register a user ID which is not valid.
|
: Encountered when trying to register a user ID which is not valid.
|
||||||
|
|
||||||
`M_ROOM_IN_USE`
|
`M_ROOM_IN_USE`
|
||||||
Sent when the room alias given to the `createRoom` API is already in
|
: Sent when the room alias given to the `createRoom` API is already in
|
||||||
use.
|
use.
|
||||||
|
|
||||||
`M_INVALID_ROOM_STATE`
|
`M_INVALID_ROOM_STATE`
|
||||||
Sent when the initial state given to the `createRoom` API is invalid.
|
: Sent when the initial state given to the `createRoom` API is invalid.
|
||||||
|
|
||||||
`M_THREEPID_IN_USE`
|
`M_THREEPID_IN_USE`
|
||||||
Sent when a threepid given to an API cannot be used because the same
|
: Sent when a threepid given to an API cannot be used because the same
|
||||||
threepid is already in use.
|
threepid is already in use.
|
||||||
|
|
||||||
`M_THREEPID_NOT_FOUND`
|
`M_THREEPID_NOT_FOUND`
|
||||||
Sent when a threepid given to an API cannot be used because no record
|
: Sent when a threepid given to an API cannot be used because no record
|
||||||
matching the threepid was found.
|
matching the threepid was found.
|
||||||
|
|
||||||
`M_THREEPID_AUTH_FAILED`
|
`M_THREEPID_AUTH_FAILED`
|
||||||
Authentication could not be performed on the third-party identifier.
|
: Authentication could not be performed on the third-party identifier.
|
||||||
|
|
||||||
`M_THREEPID_DENIED`
|
`M_THREEPID_DENIED`
|
||||||
The server does not permit this third-party identifier. This may happen
|
: The server does not permit this third-party identifier. This may happen
|
||||||
if the server only permits, for example, email addresses from a
|
if the server only permits, for example, email addresses from a
|
||||||
particular domain.
|
particular domain.
|
||||||
|
|
||||||
`M_SERVER_NOT_TRUSTED`
|
`M_SERVER_NOT_TRUSTED`
|
||||||
The client's request used a third-party server, e.g. identity server,
|
: The client's request used a third-party server, e.g. identity server,
|
||||||
that this server does not trust.
|
that this server does not trust.
|
||||||
|
|
||||||
`M_UNSUPPORTED_ROOM_VERSION`
|
`M_UNSUPPORTED_ROOM_VERSION`
|
||||||
The client's request to create a room used a room version that the
|
: The client's request to create a room used a room version that the
|
||||||
server does not support.
|
server does not support.
|
||||||
|
|
||||||
`M_INCOMPATIBLE_ROOM_VERSION`
|
`M_INCOMPATIBLE_ROOM_VERSION`
|
||||||
The client attempted to join a room that has a version the server does
|
: The client attempted to join a room that has a version the server does
|
||||||
not support. Inspect the `room_version` property of the error response
|
not support. Inspect the `room_version` property of the error response
|
||||||
for the room's version.
|
for the room's version.
|
||||||
|
|
||||||
`M_BAD_STATE`
|
`M_BAD_STATE`
|
||||||
The state change requested cannot be performed, such as attempting to
|
: The state change requested cannot be performed, such as attempting to
|
||||||
unban a user who is not banned.
|
unban a user who is not banned.
|
||||||
|
|
||||||
`M_GUEST_ACCESS_FORBIDDEN`
|
`M_GUEST_ACCESS_FORBIDDEN`
|
||||||
The room or resource does not permit guests to access it.
|
: The room or resource does not permit guests to access it.
|
||||||
|
|
||||||
`M_CAPTCHA_NEEDED`
|
`M_CAPTCHA_NEEDED`
|
||||||
A Captcha is required to complete the request.
|
: A Captcha is required to complete the request.
|
||||||
|
|
||||||
`M_CAPTCHA_INVALID`
|
`M_CAPTCHA_INVALID`
|
||||||
The Captcha provided did not match what was expected.
|
: The Captcha provided did not match what was expected.
|
||||||
|
|
||||||
`M_MISSING_PARAM`
|
`M_MISSING_PARAM`
|
||||||
A required parameter was missing from the request.
|
: A required parameter was missing from the request.
|
||||||
|
|
||||||
`M_INVALID_PARAM`
|
`M_INVALID_PARAM`
|
||||||
A parameter that was specified has the wrong value. For example, the
|
: A parameter that was specified has the wrong value. For example, the
|
||||||
server expected an integer and instead received a string.
|
server expected an integer and instead received a string.
|
||||||
|
|
||||||
`M_TOO_LARGE`
|
`M_TOO_LARGE`
|
||||||
The request or entity was too large.
|
: The request or entity was too large.
|
||||||
|
|
||||||
`M_EXCLUSIVE`
|
`M_EXCLUSIVE`
|
||||||
The resource being requested is reserved by an application service, or
|
: The resource being requested is reserved by an application service, or
|
||||||
the application service making the request has not created the resource.
|
the application service making the request has not created the resource.
|
||||||
|
|
||||||
`M_CANNOT_LEAVE_SERVER_NOTICE_ROOM`
|
`M_CANNOT_LEAVE_SERVER_NOTICE_ROOM`
|
||||||
The user is unable to reject an invite to join the server notices 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.
|
See the [Server Notices](#server-notices) module for more information.
|
||||||
|
|
||||||
`M_THREEPID_MEDIUM_NOT_SUPPORTED`
|
`M_THREEPID_MEDIUM_NOT_SUPPORTED`
|
||||||
The homeserver does not support adding a third party identifier of the given medium.
|
: The homeserver does not support adding a third party identifier of the given medium.
|
||||||
|
|
||||||
`M_THREEPID_IN_USE`
|
`M_THREEPID_IN_USE`
|
||||||
The third party identifier specified by the client is not acceptable because it is
|
: The third party identifier specified by the client is not acceptable because it is
|
||||||
already in use in some way.
|
already in use in some way.
|
||||||
|
|
||||||
#### Rate limiting
|
#### Rate limiting
|
||||||
|
|
@ -3320,7 +3320,7 @@ PUT /rooms/!roomid:domain/state/m.room.bgd.color
|
||||||
### Redactions
|
### Redactions
|
||||||
|
|
||||||
Since events are extensible it is possible for malicious users and/or
|
Since events are extensible it is possible for malicious users and/or
|
||||||
servers to add keys that are, for example offensive or illegal. Since
|
servers to add keys that are, for example, offensive or illegal. Since
|
||||||
some events cannot be simply deleted, e.g. membership events, we instead
|
some events cannot be simply deleted, e.g. membership events, we instead
|
||||||
'redact' events. This involves removing all keys from an event that are
|
'redact' events. This involves removing all keys from an event that are
|
||||||
not required by the protocol. This stripped down event is thereafter
|
not required by the protocol. This stripped down event is thereafter
|
||||||
|
|
@ -3418,7 +3418,7 @@ This specification describes the following relationship types:
|
||||||
* [Event replacements](#event-replacements).
|
* [Event replacements](#event-replacements).
|
||||||
* [Event annotations](#event-annotations-and-reactions).
|
* [Event annotations](#event-annotations-and-reactions).
|
||||||
* [Threads](#threading).
|
* [Threads](#threading).
|
||||||
* [References](#reference-relations)
|
* [References](#reference-relations).
|
||||||
|
|
||||||
#### Aggregations of child events
|
#### Aggregations of child events
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -350,11 +350,14 @@ field, and as a result should remove her from its list of tracked users.
|
||||||
When encryption is enabled in a room, files should be uploaded encrypted
|
When encryption is enabled in a room, files should be uploaded encrypted
|
||||||
on the homeserver.
|
on the homeserver.
|
||||||
|
|
||||||
In order to achieve this, a client should generate a single-use 256-bit
|
In order to achieve this, the client generates a single-use 256-bit AES
|
||||||
AES key, and encrypt the file using AES-CTR. The counter should be
|
key, and encrypts the file using AES-CTR. The counter is 64 bits long,
|
||||||
64-bit long, starting at 0 and prefixed by a random 64-bit
|
starting at 0 and prefixed by a random 64-bit Initialization Vector (IV),
|
||||||
Initialization Vector (IV), which together form a 128-bit unique counter
|
which together form a 128-bit unique counter block.
|
||||||
block.
|
|
||||||
|
Clients MUST generate both the AES key and IV using a cryptographically
|
||||||
|
secure random source and MUST NOT use the same key or IV multiple
|
||||||
|
times. The latter 64 bits of the 128-bit counter block MUST start at zero.
|
||||||
|
|
||||||
{{% boxes/warning %}}
|
{{% boxes/warning %}}
|
||||||
An IV must never be used multiple times with the same key. This implies
|
An IV must never be used multiple times with the same key. This implies
|
||||||
|
|
@ -364,13 +367,14 @@ same key and IV.
|
||||||
{{% /boxes/warning %}}
|
{{% /boxes/warning %}}
|
||||||
|
|
||||||
Then, the encrypted file can be uploaded to the homeserver. The key and
|
Then, the encrypted file can be uploaded to the homeserver. The key and
|
||||||
the IV must be included in the room event along with the resulting
|
the IV are included in the room event along with the resulting `mxc://`
|
||||||
`mxc://` in order to allow recipients to decrypt the file. As the event
|
in order to allow recipients to decrypt the file. As the event
|
||||||
containing those will be Megolm encrypted, the server will never have
|
containing those will be Megolm encrypted, the server will never have
|
||||||
access to the decrypted file.
|
access to the decrypted file.
|
||||||
|
|
||||||
A hash of the ciphertext must also be included, in order to prevent the
|
A hash of the ciphertext MUST also be included, in order to prevent the
|
||||||
homeserver from changing the file content.
|
homeserver from changing the file content. Clients MUST verify the hash
|
||||||
|
before using the file contents.
|
||||||
|
|
||||||
A client should send the data as an encrypted `m.room.message` event,
|
A client should send the data as an encrypted `m.room.message` event,
|
||||||
using either `m.file` as the msgtype, or the appropriate msgtype for the
|
using either `m.file` as the msgtype, or the appropriate msgtype for the
|
||||||
|
|
@ -392,7 +396,7 @@ properties.
|
||||||
| url | string | **Required.** The URL to the file. |
|
| url | string | **Required.** The URL to the file. |
|
||||||
| key | JWK | **Required.** A [JSON Web Key](https://tools.ietf.org/html/rfc7517#appendix-A.3) object. |
|
| key | JWK | **Required.** A [JSON Web Key](https://tools.ietf.org/html/rfc7517#appendix-A.3) object. |
|
||||||
| iv | string | **Required.** The 128-bit unique counter block used by AES-CTR, encoded as unpadded base64. |
|
| iv | string | **Required.** The 128-bit unique counter block used by AES-CTR, encoded as unpadded base64. |
|
||||||
| hashes | {string: string} | **Required.** A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64. Clients should support the SHA-256 hash, which uses the key `sha256`. |
|
| hashes | {string: string} | **Required.** A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64. Clients MUST support the SHA-256 hash, which uses the key `sha256`. |
|
||||||
| v | string | **Required.** Version of the encrypted attachment's protocol. Must be `v2`. |
|
| v | string | **Required.** Version of the encrypted attachment's protocol. Must be `v2`. |
|
||||||
|
|
||||||
`JWK`
|
`JWK`
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ flag to `true`.
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% boxes/note %}}
|
{{% boxes/note %}}
|
||||||
Clients which are acutely aware of threads (they do not render threads, but are otherwise
|
Clients which are aware of threads (they do not render threads, but are otherwise
|
||||||
aware of the feature existing in the spec) can treat rich replies to an event with a `rel_type`
|
aware of the feature existing in the spec) can treat rich replies to an event with a `rel_type`
|
||||||
of `m.thread` as a threaded reply, for conversation continuity on the threaded client's side.
|
of `m.thread` as a threaded reply, for conversation continuity on the threaded client's side.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,53 +71,53 @@ the keys `error` and `errcode` MUST always be present.
|
||||||
Some standard error codes are below:
|
Some standard error codes are below:
|
||||||
|
|
||||||
`M_NOT_FOUND`
|
`M_NOT_FOUND`
|
||||||
The resource requested could not be located.
|
: The resource requested could not be located.
|
||||||
|
|
||||||
`M_MISSING_PARAMS`
|
`M_MISSING_PARAMS`
|
||||||
The request was missing one or more parameters.
|
: The request was missing one or more parameters.
|
||||||
|
|
||||||
`M_INVALID_PARAM`
|
`M_INVALID_PARAM`
|
||||||
The request contained one or more invalid parameters.
|
: The request contained one or more invalid parameters.
|
||||||
|
|
||||||
`M_SESSION_NOT_VALIDATED`
|
`M_SESSION_NOT_VALIDATED`
|
||||||
The session has not been validated.
|
: The session has not been validated.
|
||||||
|
|
||||||
`M_NO_VALID_SESSION`
|
`M_NO_VALID_SESSION`
|
||||||
A session could not be located for the given parameters.
|
: A session could not be located for the given parameters.
|
||||||
|
|
||||||
`M_SESSION_EXPIRED`
|
`M_SESSION_EXPIRED`
|
||||||
The session has expired and must be renewed.
|
: The session has expired and must be renewed.
|
||||||
|
|
||||||
`M_INVALID_EMAIL`
|
`M_INVALID_EMAIL`
|
||||||
The email address provided was not valid.
|
: The email address provided was not valid.
|
||||||
|
|
||||||
`M_EMAIL_SEND_ERROR`
|
`M_EMAIL_SEND_ERROR`
|
||||||
There was an error sending an email. Typically seen when attempting to
|
: There was an error sending an email. Typically seen when attempting to
|
||||||
verify ownership of a given email address.
|
verify ownership of a given email address.
|
||||||
|
|
||||||
`M_INVALID_ADDRESS`
|
`M_INVALID_ADDRESS`
|
||||||
The provided third-party address was not valid.
|
: The provided third-party address was not valid.
|
||||||
|
|
||||||
`M_SEND_ERROR`
|
`M_SEND_ERROR`
|
||||||
There was an error sending a notification. Typically seen when
|
: There was an error sending a notification. Typically seen when
|
||||||
attempting to verify ownership of a given third-party address.
|
attempting to verify ownership of a given third-party address.
|
||||||
|
|
||||||
`M_UNRECOGNIZED`
|
`M_UNRECOGNIZED`
|
||||||
The request contained an unrecognised value, such as an unknown token or
|
: The request contained an unrecognised value, such as an unknown token or
|
||||||
medium.
|
medium.
|
||||||
|
|
||||||
This is also used as the response if a server did not understand the request.
|
: This is also used as the response if a server did not understand the request.
|
||||||
This is expected to be returned with a 404 HTTP status code if the endpoint is
|
This is expected to be returned with a 404 HTTP status code if the endpoint is
|
||||||
not implemented or a 405 HTTP status code if the endpoint is implemented, but
|
not implemented or a 405 HTTP status code if the endpoint is implemented, but
|
||||||
the incorrect HTTP method is used.
|
the incorrect HTTP method is used.
|
||||||
|
|
||||||
`M_THREEPID_IN_USE`
|
`M_THREEPID_IN_USE`
|
||||||
The third-party identifier is already in use by another user. Typically
|
: The third-party identifier is already in use by another user. Typically
|
||||||
this error will have an additional `mxid` property to indicate who owns
|
this error will have an additional `mxid` property to indicate who owns
|
||||||
the third-party identifier.
|
the third-party identifier.
|
||||||
|
|
||||||
`M_UNKNOWN`
|
`M_UNKNOWN`
|
||||||
An unknown error has occurred.
|
: An unknown error has occurred.
|
||||||
|
|
||||||
## Privacy
|
## Privacy
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@ properties:
|
||||||
not_senders:
|
not_senders:
|
||||||
description: A list of sender IDs to exclude. If this list is absent then no senders
|
description: A list of sender IDs to exclude. If this list is absent then no senders
|
||||||
are excluded. A matching sender will be excluded even if it is listed in the
|
are excluded. A matching sender will be excluded even if it is listed in the
|
||||||
`'senders'` filter.
|
`senders` filter.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
not_types:
|
not_types:
|
||||||
description: A list of event types to exclude. If this list is absent then no
|
description: A list of event types to exclude. If this list is absent then no
|
||||||
event types are excluded. A matching type will be excluded even if it is listed
|
event types are excluded. A matching type will be excluded even if it is listed
|
||||||
in the `'types'` filter. A '*' can be used as a wildcard to match any sequence
|
in the `types` filter. A `*` can be used as a wildcard to match any sequence
|
||||||
of characters.
|
of characters.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -43,7 +43,7 @@ properties:
|
||||||
type: array
|
type: array
|
||||||
types:
|
types:
|
||||||
description: A list of event types to include. If this list is absent then all
|
description: A list of event types to include. If this list is absent then all
|
||||||
event types are included. A `'*'` can be used as a wildcard to match any sequence
|
event types are included. A `*` can be used as a wildcard to match any sequence
|
||||||
of characters.
|
of characters.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ allOf:
|
||||||
for more information. Defaults to `false`.
|
for more information. Defaults to `false`.
|
||||||
not_rooms:
|
not_rooms:
|
||||||
description: A list of room IDs to exclude. If this list is absent then no rooms
|
description: A list of room IDs to exclude. If this list is absent then no rooms
|
||||||
are excluded. A matching room will be excluded even if it is listed in the `'rooms'`
|
are excluded. A matching room will be excluded even if it is listed in the `rooms`
|
||||||
filter.
|
filter.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,15 @@ properties:
|
||||||
event_fields:
|
event_fields:
|
||||||
description: List of event fields to include. If this list is absent then all
|
description: List of event fields to include. If this list is absent then all
|
||||||
fields are included. The entries are [dot-separated paths for each property](/appendices#dot-separated-property-paths)
|
fields are included. The entries are [dot-separated paths for each property](/appendices#dot-separated-property-paths)
|
||||||
to include. So ['content.body'] will include the 'body' field of the 'content' object.
|
to include. So `['content.body']` will include the `body` field of the `content` object.
|
||||||
A server may include more fields than were requested.
|
A server may include more fields than were requested.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
event_format:
|
event_format:
|
||||||
description: The format to use for events. 'client' will return the events in
|
description: The format to use for events. `client` will return the events in
|
||||||
a format suitable for clients. 'federation' will return the raw event as received
|
a format suitable for clients. `federation` will return the raw event as received
|
||||||
over federation. The default is 'client'.
|
over federation. The default is `client`.
|
||||||
enum:
|
enum:
|
||||||
- client
|
- client
|
||||||
- federation
|
- federation
|
||||||
|
|
@ -45,7 +45,7 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
not_rooms:
|
not_rooms:
|
||||||
description: A list of room IDs to exclude. If this list is absent then no rooms
|
description: A list of room IDs to exclude. If this list is absent then no rooms
|
||||||
are excluded. A matching room will be excluded even if it is listed in the `'rooms'`
|
are excluded. A matching room will be excluded even if it is listed in the `rooms`
|
||||||
filter. This filter is applied before the filters in `ephemeral`,
|
filter. This filter is applied before the filters in `ephemeral`,
|
||||||
`state`, `timeline` or `account_data`
|
`state`, `timeline` or `account_data`
|
||||||
items:
|
items:
|
||||||
|
|
@ -65,7 +65,7 @@ properties:
|
||||||
events that appear in the `ephemeral` property in the `/sync`
|
events that appear in the `ephemeral` property in the `/sync`
|
||||||
response.
|
response.
|
||||||
include_leave:
|
include_leave:
|
||||||
description: Include rooms that the user has left in the sync, default false
|
description: Include rooms that the user has left in the sync. Defaults to `false`.
|
||||||
type: boolean
|
type: boolean
|
||||||
state:
|
state:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ paths:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |-
|
description: |-
|
||||||
Whether or not to include all known networks/protocols from
|
Whether or not to include all known networks/protocols from
|
||||||
application services on the homeserver. Defaults to false.
|
application services on the homeserver. Defaults to `false`.
|
||||||
example: false
|
example: false
|
||||||
third_party_instance_id:
|
third_party_instance_id:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -277,4 +277,4 @@ components:
|
||||||
accessTokenQuery:
|
accessTokenQuery:
|
||||||
$ref: definitions/security.yaml#/accessTokenQuery
|
$ref: definitions/security.yaml#/accessTokenQuery
|
||||||
accessTokenBearer:
|
accessTokenBearer:
|
||||||
$ref: definitions/security.yaml#/accessTokenBearer
|
$ref: definitions/security.yaml#/accessTokenBearer
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ paths:
|
||||||
known client device, a new device will be created. The given
|
known client device, a new device will be created. The given
|
||||||
device ID must not be the same as a
|
device ID must not be the same as a
|
||||||
[cross-signing](/client-server-api/#cross-signing) key ID.
|
[cross-signing](/client-server-api/#cross-signing) key ID.
|
||||||
The server will auto-generate a device_id
|
The server will auto-generate a `device_id`
|
||||||
if this is not specified.
|
if this is not specified.
|
||||||
initial_device_display_name:
|
initial_device_display_name:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ paths:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |-
|
description: |-
|
||||||
Whether the user's other access tokens, and their associated devices, should be
|
Whether the user's other access tokens, and their associated devices, should be
|
||||||
revoked if the request succeeds. Defaults to true.
|
revoked if the request succeeds. Defaults to `true`.
|
||||||
|
|
||||||
When `false`, the server can still take advantage of the [soft logout method](/client-server-api/#soft-logout)
|
When `false`, the server can still take advantage of the [soft logout method](/client-server-api/#soft-logout)
|
||||||
for the user's remaining devices.
|
for the user's remaining devices.
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ paths:
|
||||||
description: |-
|
description: |-
|
||||||
ID of the client device. If this does not correspond to a
|
ID of the client device. If this does not correspond to a
|
||||||
known client device, a new device will be created. The server
|
known client device, a new device will be created. The server
|
||||||
will auto-generate a device_id if this is not specified.
|
will auto-generate a `device_id` if this is not specified.
|
||||||
example: GHTYAJCE
|
example: GHTYAJCE
|
||||||
initial_device_display_name:
|
initial_device_display_name:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -139,11 +139,11 @@ paths:
|
||||||
description: |-
|
description: |-
|
||||||
If true, an `access_token` and `device_id` should not be
|
If true, an `access_token` and `device_id` should not be
|
||||||
returned from this call, therefore preventing an automatic
|
returned from this call, therefore preventing an automatic
|
||||||
login. Defaults to false.
|
login. Defaults to `false`.
|
||||||
example: false
|
example: false
|
||||||
refresh_token:
|
refresh_token:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: If true, the client supports refresh tokens.
|
description: If `true`, the client supports refresh tokens.
|
||||||
x-addedInMatrixVersion: "1.3"
|
x-addedInMatrixVersion: "1.3"
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,15 @@ paths:
|
||||||
the appropriate people. How such information is delivered is left up to
|
the appropriate people. How such information is delivered is left up to
|
||||||
implementations. The caller is not required to be joined to the room to
|
implementations. The caller is not required to be joined to the room to
|
||||||
report it.
|
report it.
|
||||||
|
|
||||||
|
Clients could infer whether a reported room exists based on the 404 response.
|
||||||
|
Homeservers that wish to conceal this information MAY return 200 responses
|
||||||
|
regardless of the existence of the reported room.
|
||||||
|
|
||||||
|
Furthermore, it might be possible for clients to deduce whether a reported
|
||||||
|
room exists by timing the response. This is because only a report for an
|
||||||
|
existing room will require the homeserver to do further processing. To
|
||||||
|
combat this, homeservers MAY add a random delay when generating a response.
|
||||||
operationId: reportRoom
|
operationId: reportRoom
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
|
|
@ -52,6 +61,11 @@ paths:
|
||||||
security:
|
security:
|
||||||
- accessTokenQuery: []
|
- accessTokenQuery: []
|
||||||
- accessTokenBearer: []
|
- accessTokenBearer: []
|
||||||
|
x-changedInMatrixVersion:
|
||||||
|
1.18: |
|
||||||
|
Servers MAY prevent room ID enumeration by using the 200 response
|
||||||
|
regardless of the existence of the reported room and/or by adding
|
||||||
|
a random delay when generating responses.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The room has been reported successfully.
|
description: The room has been reported successfully.
|
||||||
|
|
@ -91,6 +105,10 @@ paths:
|
||||||
the appropriate people. The caller must be joined to the room to report
|
the appropriate people. The caller must be joined to the room to report
|
||||||
it.
|
it.
|
||||||
|
|
||||||
|
Clients could infer whether a reported event or room exists based on the 404
|
||||||
|
response. Homeservers that wish to conceal this information MAY return 200
|
||||||
|
responses regardless of the existence of the reported event or room.
|
||||||
|
|
||||||
Furthermore, it might be possible for clients to deduce whether a reported
|
Furthermore, it might be possible for clients to deduce whether a reported
|
||||||
event exists by timing the response. This is because only a report for an
|
event exists by timing the response. This is because only a report for an
|
||||||
existing event will require the homeserver to do further processing. To
|
existing event will require the homeserver to do further processing. To
|
||||||
|
|
@ -117,15 +135,9 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
example: {
|
example: {
|
||||||
"score": -100,
|
|
||||||
"reason": "this makes me sad"
|
"reason": "this makes me sad"
|
||||||
}
|
}
|
||||||
properties:
|
properties:
|
||||||
score:
|
|
||||||
type: integer
|
|
||||||
description: |-
|
|
||||||
The score to rate this content as where -100 is most offensive
|
|
||||||
and 0 is inoffensive.
|
|
||||||
reason:
|
reason:
|
||||||
type: string
|
type: string
|
||||||
description: The reason the content is being reported.
|
description: The reason the content is being reported.
|
||||||
|
|
@ -136,6 +148,10 @@ paths:
|
||||||
x-changedInMatrixVersion:
|
x-changedInMatrixVersion:
|
||||||
1.8: |
|
1.8: |
|
||||||
This endpoint now requires the user to be joined to the room.
|
This endpoint now requires the user to be joined to the room.
|
||||||
|
1.18: |
|
||||||
|
The `score` request parameter was removed. Additionally, servers
|
||||||
|
may prevent event/room ID enumeration by using the 200 response
|
||||||
|
regardless of the existence of the reported event/room.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The event has been reported successfully.
|
description: The event has been reported successfully.
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ paths:
|
||||||
|
|
||||||
The body of the request should be the content object of the event; the
|
The body of the request should be the content object of the event; the
|
||||||
fields in this object will vary depending on the type of event. See
|
fields in this object will vary depending on the type of event. See
|
||||||
[Room Events](/client-server-api/#room-events) for the m. event specification.
|
[Room Events](/client-server-api/#room-events) for the `m.` event specification.
|
||||||
|
|
||||||
Homeservers MUST allow clients to send `m.room.redaction` events with this
|
Homeservers MUST allow clients to send `m.room.redaction` events with this
|
||||||
endpoint for all room versions. In rooms with a version older than 11 they
|
endpoint for all room versions. In rooms with a version older than 11 they
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ paths:
|
||||||
name: include_all_networks
|
name: include_all_networks
|
||||||
description: |-
|
description: |-
|
||||||
Whether or not to include all networks/protocols defined by application
|
Whether or not to include all networks/protocols defined by application
|
||||||
services on the homeserver. Defaults to false.
|
services on the homeserver. Defaults to `false`.
|
||||||
example: false
|
example: false
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
@ -121,7 +121,7 @@ paths:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |-
|
description: |-
|
||||||
Whether or not to include all known networks/protocols from
|
Whether or not to include all known networks/protocols from
|
||||||
application services on the homeserver. Defaults to false.
|
application services on the homeserver. Defaults to `false`.
|
||||||
example: false
|
example: false
|
||||||
third_party_instance_id:
|
third_party_instance_id:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@ properties:
|
||||||
When interacting with the REST API, this is the HTTP body.
|
When interacting with the REST API, this is the HTTP body.
|
||||||
type: object
|
type: object
|
||||||
type:
|
type:
|
||||||
description: The type of event. This SHOULD be namespaced similar to Java package
|
description: The type of event, as defined by [the event type specification](/client-server-api/#types-of-room-events).
|
||||||
naming conventions e.g. 'com.example.subdomain.event.type'
|
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ properties:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |-
|
description: |-
|
||||||
True to allow server names that are IP address literals. False to
|
True to allow server names that are IP address literals. False to
|
||||||
deny. Defaults to true if missing or otherwise not a boolean.
|
deny. Defaults to `true` if missing or otherwise not a boolean.
|
||||||
|
|
||||||
This is strongly recommended to be set to `false` as servers running
|
This is strongly recommended to be set to `false` as servers running
|
||||||
with IP literal names are strongly discouraged in order to require
|
with IP literal names are strongly discouraged in order to require
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{ if $state_key }}
|
{{ if $state_key }}
|
||||||
<tr>
|
<tr>
|
||||||
<th>State key</th>
|
<th>State key:</th>
|
||||||
<td>{{ $state_key.description | markdownify }}</td>
|
<td>{{ $state_key.description | markdownify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue