mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-05-01 22:54:10 +02:00
Compare commits
1 commit
5785581f6e
...
edac214bac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edac214bac |
|
|
@ -1 +0,0 @@
|
||||||
Add `M_USER_LIMIT_EXCEEDED` common error code, as per [MSC4335](https://github.com/matrix-org/matrix-spec-proposals/pull/4335).
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Add the `is_animated` flag to the `info` object of the `m.image` msgtype and the `m.sticker` event, as per [MSC4230](https://github.com/matrix-org/matrix-spec-proposals/pull/423O).
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Add link to JSON signing algorithm in server-server auth section for clarity. Contributed by @thetayloredman.
|
|
||||||
|
|
@ -147,37 +147,6 @@ state (e.g.: sending messages, account data, etc) and not routes which
|
||||||
only read state (e.g.: [`/sync`](#get_matrixclientv3sync),
|
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_USER_LIMIT_EXCEEDED`
|
|
||||||
: {{% added-in v="1.18" %}} The request cannot be completed because the user has
|
|
||||||
exceeded (or the request would cause them to exceed) a limit associated with
|
|
||||||
their account. For example, a user may have reached their allocated storage
|
|
||||||
quota, reached a maximum number of allowed rooms, devices, or other
|
|
||||||
account-scoped resources, or exceeded usage limits for specific features.
|
|
||||||
|
|
||||||
: The error response MUST have an `info_uri` field (string), which is a URI
|
|
||||||
that the client can present to the user to provide more context on the
|
|
||||||
encountered limit and, if applicable, guidance on how to increase the limit.
|
|
||||||
The homeserver MAY return different values for `info_uri` depending on the type
|
|
||||||
of limit reached.
|
|
||||||
|
|
||||||
: The error response MAY include a `can_upgrade` field (boolean, default `false`).
|
|
||||||
If `true`, it indicates that the specific limit encountered can be increased,
|
|
||||||
for example by upgrading the user's account tier. If absent or `false`, the
|
|
||||||
limit is a hard limit that cannot be increased.
|
|
||||||
|
|
||||||
: The HTTP status code will depend on depend on the particular endpoint.
|
|
||||||
|
|
||||||
: Example response:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"errcode": "M_USER_LIMIT_EXCEEDED",
|
|
||||||
"error": "You have exceeded your storage quota of 10GB",
|
|
||||||
"info_uri": "https://example.com/homeserver/about?limit_type=quota",
|
|
||||||
"can_upgrade": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
`M_UNKNOWN`
|
`M_UNKNOWN`
|
||||||
: An unknown error has occurred.
|
: An unknown error has occurred.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -277,12 +277,12 @@ queried from multiple servers to mitigate against DNS spoofing.
|
||||||
|
|
||||||
Every HTTP request made by a homeserver is authenticated using public
|
Every HTTP request made by a homeserver is authenticated using public
|
||||||
key digital signatures. The request method, target and body are signed
|
key digital signatures. The request method, target and body are signed
|
||||||
by wrapping them in a JSON object and signing it using the [JSON signing
|
by wrapping them in a JSON object and signing it using the JSON signing
|
||||||
algorithm](/appendices#signing-json). The resulting signatures are added
|
algorithm. The resulting signatures are added as an Authorization header
|
||||||
as an Authorization header with an auth scheme of `X-Matrix`. Note that
|
with an auth scheme of `X-Matrix`. Note that the target field should
|
||||||
the target field should include the full path starting with `/_matrix/...`,
|
include the full path starting with `/_matrix/...`, including the `?`
|
||||||
including the `?` and any query parameters if present, but should not
|
and any query parameters if present, but should not include the leading
|
||||||
include the leading `https:`, nor the destination server's hostname.
|
`https:`, nor the destination server's hostname.
|
||||||
|
|
||||||
Step 1 sign JSON:
|
Step 1 sign JSON:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@
|
||||||
"h": 398,
|
"h": 398,
|
||||||
"w": 394,
|
"w": 394,
|
||||||
"mimetype": "image/jpeg",
|
"mimetype": "image/jpeg",
|
||||||
"size": 31037,
|
"size": 31037
|
||||||
"is_animated": false
|
|
||||||
},
|
},
|
||||||
"url": "mxc://example.org/JWEIFJgwEIhweiWJE",
|
"url": "mxc://example.org/JWEIFJgwEIhweiWJE",
|
||||||
"msgtype": "m.image"
|
"msgtype": "m.image"
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
"mimetype": "image/png",
|
"mimetype": "image/png",
|
||||||
"h": 200,
|
"h": 200,
|
||||||
"w": 140,
|
"w": 140,
|
||||||
"size": 73602,
|
"size": 73602
|
||||||
"is_animated": true
|
|
||||||
},
|
},
|
||||||
"h": 200,
|
"h": 200,
|
||||||
"thumbnail_url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP",
|
"thumbnail_url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP",
|
||||||
|
|
|
||||||
|
|
@ -34,19 +34,5 @@ properties:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: thumbnail_info.yaml
|
- $ref: thumbnail_info.yaml
|
||||||
description: Metadata about the image referred to in `thumbnail_url`.
|
description: Metadata about the image referred to in `thumbnail_url`.
|
||||||
is_animated:
|
|
||||||
x-addedInMatrixVersion: "1.18"
|
|
||||||
description: |-
|
|
||||||
If this flag is `true`, the original image SHOULD be assumed to be
|
|
||||||
animated. If this flag is `false`, the original image SHOULD be assumed to
|
|
||||||
NOT be animated.
|
|
||||||
|
|
||||||
If a sending client is unable to determine whether an image is animated,
|
|
||||||
it SHOULD leave the flag unset.
|
|
||||||
|
|
||||||
Receiving clients MAY use this flag to optimize whether to download the
|
|
||||||
original image rather than a thumbnail if it is animated, but they SHOULD
|
|
||||||
NOT trust this flag.
|
|
||||||
type: boolean
|
|
||||||
title: ImageInfo
|
title: ImageInfo
|
||||||
type: object
|
type: object
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue