Compare commits

..

No commits in common. "729d50cd4a44d3e99e2b8414d7a6f31af3b39dbe" and "f2c14eee9caef8a6fd051f19bf115599faa82080" have entirely different histories.

3 changed files with 39 additions and 38 deletions

View file

@ -63,8 +63,8 @@ for sending events:
The following API endpoints are allowed to be accessed by guest accounts The following API endpoints are allowed to be accessed by guest accounts
for their own account maintenance: for their own account maintenance:
* [PUT /profile/{userId}/displayname](#put_matrixclientv3profileuseridkeyname). Guest users may only modify their display name; other profile fields may not be changed. * [PUT /profile/{userId}/displayname](#put_matrixclientv3profileuseridkeyname) guests users may only modify their displayname in their profile
* {{% added-in v="1.16" %}} [DELETE /profile/{userId}/displayname](#delete_matrixclientv3profileuseridkeyname). Again, guest users may delete their display name but not other profile fields. * [DELETE /profile/{userId}/displayname](#delete_matrixclientv3profileuseridkeyname) guests users may only modify their displayname in their profile
* [GET /devices](#get_matrixclientv3devices) * [GET /devices](#get_matrixclientv3devices)
* [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid) * [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid)
* [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid) * [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid)

View file

@ -112,12 +112,9 @@ paths:
properties: properties:
allowed: allowed:
type: array type: array
description: | description: List of allowed additional custom profile field keys. A `*` can be used as a
If present, a list of profile fields that clients are allowed to create, modify or delete, wildcard to match any sequence of characters. This list takes precedence over the
provided `enabled` is `true`; no other profile fields may be changed. disallowed list if both are provided.
If absent, clients may set all profile fields except those forbidden by the `disallowed`
list, where present.
items: items:
type: string type: string
example: example:
@ -125,12 +122,11 @@ paths:
- "org.example.job_title" - "org.example.job_title"
disallowed: disallowed:
type: array type: array
description: | description: If `enabled` is `true`, a list of profile fields that clients are _not_ allowed to
This property has no meaning if `allowed` is also specified. create, modify or delete. Clients SHOULD assume all fields not in this list to be unmanaged
and available for their use.
Otherwise, if present, a list of profile fields that clients are _not_ allowed to create, modify or delete. Only one of `allowed` and `disallowed` is permitted at the same time.
Provided `enabled` is `true`, clients MAY assume that they can set any profile field which is not
included in this list.
items: items:
type: string type: string
example: example:

View file

@ -19,7 +19,7 @@ paths:
"/profile/{userId}/{keyName}": "/profile/{userId}/{keyName}":
put: put:
x-changedInMatrixVersion: x-changedInMatrixVersion:
"1.16": This endpoint now accepts a variable `keyName` parameter. Previously only `displayname` and `avatar_url` were accepted. "1.16": This endpoint now accepts a variable `keyName` parameter.
summary: Set a profile field for a user. summary: Set a profile field for a user.
description: |- description: |-
Set or update a profile field for a user. Must be authenticated with an Set or update a profile field for a user. Must be authenticated with an
@ -43,7 +43,7 @@ paths:
type: string type: string
- in: path - in: path
name: keyName name: keyName
description: The name of the profile field to set. This MUST be either description: The profile field key name to set. This MUST be either
`avatar_url`, `displayname`, or a custom field following the `avatar_url`, `displayname`, or a custom field following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar). [Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
required: true required: true
@ -61,16 +61,12 @@ paths:
schema: schema:
type: object type: object
minProperties: 1 minProperties: 1
description: | description: The JSON object must include a property whose key
An object which contains exactly one property. The key matches the `keyName` specified in the URL. For `avatar_url`,
of that property MUST match the `keyName` specified in the URL. the value must be an MXC URI string. For `displayname`, the value
must be a string. For custom keys, any JSON type is allowed -
For `avatar_url`, the value MUST be an MXC URI string. servers may not validate these values, but clients should follow
the format defined for that key.
For `displayname`, the value MUST be a string.
For custom keys, any JSON type is allowed. Servers MAY not validate
these values, but clients SHOULD follow the format defined for that key.
additionalProperties: true additionalProperties: true
example: { "displayname": "Alice Wonderland" } example: { "displayname": "Alice Wonderland" }
responses: responses:
@ -89,7 +85,7 @@ paths:
of the following error codes: of the following error codes:
- `M_BAD_JSON`: The provided value is not valid JSON. - `M_BAD_JSON`: The provided value is not valid JSON.
- `M_MISSING_PARAM`: The required `keyName` property is - `M_MISSING_PARAM`: The required `{keyName}` property is
missing from the request body. missing from the request body.
- `M_PROFILE_TOO_LARGE`: Storing the supplied value would - `M_PROFILE_TOO_LARGE`: Storing the supplied value would
make the profile exceed its maximum allowed size of 64 KiB. make the profile exceed its maximum allowed size of 64 KiB.
@ -137,7 +133,7 @@ paths:
- User data - User data
get: get:
x-changedInMatrixVersion: x-changedInMatrixVersion:
"1.16": This endpoint now accepts a variable `keyName` parameter. Previously only `displayname` and `avatar_url` were accepted. "1.16": This endpoint now accepts a variable `keyName` parameter.
summary: Get a profile field for a user. summary: Get a profile field for a user.
description: Get the value of a profile field for a user. description: Get the value of a profile field for a user.
operationId: getProfileField operationId: getProfileField
@ -151,7 +147,9 @@ paths:
type: string type: string
- in: path - in: path
name: keyName name: keyName
description: The name of the profile field to retrieve. description: The profile field key name to retrieve. It must be either
`avatar_url`, `displayname`, or a custom field following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
required: true required: true
example: "displayname" example: "displayname"
schema: schema:
@ -164,9 +162,12 @@ paths:
application/json: application/json:
schema: schema:
type: object type: object
description: | description: If a value is stored for `keyName`, the JSON response
An object with one property, whose key matches the `keyName` specified includes a property whose key matches the `keyName` specified
in the URL, and whose value is the current setting of that profile field. in the URL. For `avatar_url`, the value will be an MXC URI string.
For `displayname`, the value will be a string. For custom keys, any
JSON type is possible - clients should expect the format defined
for that key.
additionalProperties: true additionalProperties: true
examples: examples:
response: response:
@ -209,7 +210,9 @@ paths:
type: string type: string
- in: path - in: path
name: keyName name: keyName
description: The name of the profile field to delete. description: The key name of the profile field to delete. It must be either
`avatar_url`, `displayname`, or a custom field following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
required: true required: true
example: "displayname" example: "displayname"
schema: schema:
@ -217,7 +220,7 @@ paths:
pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$' pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
responses: responses:
"200": "200":
description: The profile field was deleted or it doesn't exist. description: The profile field was deleted.
content: content:
application/json: application/json:
schema: schema:
@ -267,7 +270,9 @@ paths:
get: get:
summary: Get all profile information for a user. summary: Get all profile information for a user.
description: |- description: |-
Get the complete profile for a user. Get the complete profile for a user. The response includes `avatar_url`
and `displayname` (unless set to `null`, as they can only be strings)
plus any custom profile fields.
operationId: getUserProfile operationId: getUserProfile
parameters: parameters:
- in: path - in: path
@ -288,14 +293,14 @@ paths:
avatar_url: avatar_url:
type: string type: string
format: mx-mxc-uri format: mx-mxc-uri
description: The user's avatar URL if they have set one, otherwise not present. description: "Avatar URL value (MXC URI format)."
displayname: displayname:
type: string type: string
description: The user's display name if they have set one, otherwise not
present.
additionalProperties: additionalProperties:
x-addedInMatrixVersion: "1.16" x-addedInMatrixVersion: "1.16"
description: Additional profile fields. description: Any additional profile field value; may be any
valid JSON type, with keys following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
examples: examples:
response: response:
value: value: