Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
fdc012a
Describe MSC4133 profile endpoint changes
tcpipuk Feb 13, 2025
212377e
Merge branch 'matrix-org:main' into MSC4133
tcpipuk Feb 14, 2025
1fc0118
2071 change log
tcpipuk Feb 14, 2025
b2e122f
Update changelog from `clarification` to `feature`
tcpipuk Feb 14, 2025
59d2c62
Link to MSC4133 in endpoint descriptions
tcpipuk Feb 14, 2025
ee9b5dd
Correct types and errors
tcpipuk Feb 14, 2025
8e9874a
Simplify change log
tcpipuk Feb 14, 2025
41c64c8
Linkify MSC4133 in change log
tcpipuk Feb 14, 2025
82adcec
Clarify `avatar_url` should be MXC
tcpipuk Feb 14, 2025
4f8999b
Tweak wording on full profile `GET`
tcpipuk Feb 14, 2025
992cf9d
Clarify `null` behaviour for `PUT` and `DELETE`
tcpipuk Feb 14, 2025
3311b08
Alphabetise `avatar_url` and `displayname` and remove redundant descr…
tcpipuk Feb 14, 2025
f3c269d
Added capability
tcpipuk Feb 14, 2025
9327793
Inline information from MSC4133, remove links
tcpipuk Feb 14, 2025
5d5b561
Deprecate `m.set_displayname` and `m.set_avatar_url` capabilities
tcpipuk Feb 14, 2025
76b48e2
Specify CNIG pattern for custom fields
tcpipuk Feb 14, 2025
79a1cde
Remove reference to spec version in `m.profile_field` capability
tcpipuk Feb 14, 2025
17af55d
Fix broken link
tcpipuk Feb 14, 2025
79af780
Camel case for endpoint variables
tcpipuk Feb 14, 2025
1cc93ec
Attempt to make descriptions look better in HTML rendered spec
tcpipuk Feb 14, 2025
0b0942d
Clarify capability lists should support wildcards
tcpipuk Feb 14, 2025
7a3b0c0
Clarify in change log that `m.set_avatar_url` and `m.set_displayname`…
tcpipuk Feb 14, 2025
9859e20
Don't use reference for capability.
tcpipuk Feb 20, 2025
013502b
Mention replacement for `m.set_displayname` and `m.set_avatar_url` ca…
tcpipuk Feb 20, 2025
9889fe3
Use more accessible terminology than "glob"
tcpipuk Feb 20, 2025
3a5e555
Correct `PUT`/`GET` payload definitions
tcpipuk Feb 20, 2025
7ef1d9d
Add `x-changedInMatrixVersion`
tcpipuk Feb 20, 2025
b5e2edf
Add `x-addedInMatrixVersion`
tcpipuk Feb 20, 2025
d8cc250
Tag `x-addedInMatrixVersion` on `additionalProperties` in entire prof…
tcpipuk Feb 20, 2025
37b1362
Attempt to describe variable payload content
tcpipuk Feb 20, 2025
50eab35
Standardise line-wrapping and update `avatar_url` format to `mx-mxc-uri`
tcpipuk Feb 21, 2025
dd4ea94
Clarify why `avatar_url` and `displayname` can't be returned as `null`
tcpipuk Feb 21, 2025
6183f24
Clarify value validation requirements
tcpipuk Feb 21, 2025
6646146
Accept minor suggestions from code review
clokep Jun 13, 2025
569c8aa
Merge upstream main into MSC4133
tcpipuk Jul 31, 2025
d60c847
Add profile_fields capability and deprecations into text section
Johennes Jul 31, 2025
5a08263
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
b834933
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
648c050
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
48ee9cf
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
9357cea
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
3f5c14b
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
22a3405
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
6a8b542
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
3da3b18
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
0a87d1b
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
4408198
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
e78b073
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
c67980a
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
7c18c4d
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
0c6132e
Deprecate `m.set_avatar_url` and `m.set_displayname` capabilities
tcpipuk Jul 31, 2025
c197a23
Update changelogs/client_server/newsfragments/2071.feature
tcpipuk Jul 31, 2025
f5b9209
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
df9d3e6
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
c9057ed
Update data/api/client-server/profile.yaml
tcpipuk Jul 31, 2025
ea02776
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
0051295
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
4293659
Update data/api/client-server/capabilities.yaml
tcpipuk Jul 31, 2025
578e1fb
Update content/client-server-api/modules/guest_access.md
tcpipuk Aug 1, 2025
f2c14ee
Fix invalid YAML
richvdh Aug 5, 2025
f44ccf4
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
a10fea2
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
c2827c4
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
e643208
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
105ad39
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
6dba799
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
88697f7
Update data/api/client-server/capabilities.yaml
tcpipuk Aug 6, 2025
ec7fa46
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
ef266e8
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
6b85e93
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
4bb5ae8
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
947cc30
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
187aeb0
Update data/api/client-server/capabilities.yaml
tcpipuk Aug 6, 2025
eb8d9ec
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
7c67865
Update content/client-server-api/modules/guest_access.md
tcpipuk Aug 6, 2025
729d50c
Update data/api/client-server/profile.yaml
tcpipuk Aug 6, 2025
78ca690
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
08ef01b
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
a644bcd
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
cd527f5
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
11cc848
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
681a761
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
0d89ec8
Update content/client-server-api/_index.md
Johennes Aug 6, 2025
433f036
Merge pull request #2 from Johennes/MSC4133
tcpipuk Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/2071.deprecation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate `m.set_avatar_url` and `m.set_displayname` capabilities, as per [MSC4133](https://github.com/matrix-org/matrix-spec-proposals/pull/4133).
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/2071.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update user profile endpoints to handle custom fields, and add a new `m.profile_fields` capability,as per [MSC4133](https://github.com/matrix-org/matrix-spec-proposals/pull/4133).
69 changes: 69 additions & 0 deletions content/client-server-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,66 @@ using an `unstable` version.
When this capability is not listed, clients should use `"1"` as the
default and only stable `available` room version.

### `m.profile_fields` capability

{{% added-in v="1.16" %}}

This capability defines which [profile](#profiles) fields the user is
able to change.

The capability value has a required flag, `enabled`, and two optional lists, `allowed` and
`disallowed`.

When `enabled` is `false`, all profile fields are managed by the server
and the client is not permitted to make any changes.

When `enabled` is `true`, clients are permitted to modify profile fields,
subject to the restrictions implied by the OPTIONAL lists `allowed` and
`disallowed`.

If `allowed` is present, clients can modify only the fields
listed. They SHOULD assume all other fields to be managed by
the server. In this case, `disallowed` has no meaning and should be ignored.

If `disallowed` is present (and `allowed` is not), clients SHOULD assume
that the listed fields are managed by the server. Clients may modify any
fields that are *not* listed, provided `enabled` is `true`.

If neither `allowed` nor `disallowed` is present, clients can modify all fields
without restrictions, provided `enabled` is `true`.

When this capability is not listed, clients SHOULD assume the user is able to change
profile fields without any restrictions, provided the homeserver
advertises a specification version that includes the `m.profile_fields`
capability in the [`/versions`](/client-server-api/#get_matrixclientversions)
response.

An example of the capability API's response for this capability is:

```json
{
"capabilities": {
"m.profile_fields": {
"enabled": true,
"disallowed": ["displayname"]
}
}
}
```

### `m.set_displayname` capability

{{% boxes/note %}}
{{% changed-in v="1.16" %}}
This capability is now deprecated. Clients SHOULD use the
[`m.profile_fields`](/client-server-api/#mprofile_fields-capability)
capability instead.

For backwards compatibility, servers that forbid setting the
`displayname` profile field in the `m.profile_fields` capability
MUST still present this capability with `"enabled": false`.
{{% /boxes/note %}}

This capability has a single flag, `enabled`, to denote whether the user
is able to change their own display name via profile endpoints. Cases for
disabling might include users mapped from external identity/directory
Expand All @@ -2517,6 +2575,17 @@ An example of the capability API's response for this capability is:

### `m.set_avatar_url` capability

{{% boxes/note %}}
{{% changed-in v="1.16" %}}
This capability is now deprecated. Clients SHOULD use the
[`m.profile_fields`](/client-server-api/#mprofile_fields-capability)
capability instead.

For backwards compatibility, servers that forbid setting the
`avatar_url` profile field in the `m.profile_fields` capability
MUST still present this capability with `"enabled": false`.
{{% /boxes/note %}}

This capability has a single flag, `enabled`, to denote whether the user
is able to change their own avatar via profile endpoints. Cases for
disabling might include users mapped from external identity/directory
Expand Down
3 changes: 2 additions & 1 deletion content/client-server-api/modules/guest_access.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ for sending events:
The following API endpoints are allowed to be accessed by guest accounts
for their own account maintenance:

* [PUT /profile/{userId}/displayname](#put_matrixclientv3profileuseriddisplayname)
* [PUT /profile/{userId}/displayname](#put_matrixclientv3profileuseridkeyname). Guest users may only modify their display name; other profile fields may not be changed.
* {{% added-in v="1.16" %}} [DELETE /profile/{userId}/displayname](#delete_matrixclientv3profileuseridkeyname). Again, guest users may delete their display name but not other profile fields.
* [GET /devices](#get_matrixclientv3devices)
* [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid)
* [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid)
Expand Down
59 changes: 57 additions & 2 deletions data/api/client-server/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,25 @@ paths:
- default
- available
m.set_displayname:
deprecated: true
$ref: '#/components/schemas/booleanCapability'
description: Capability to indicate if the user can change their display name.
description: |
**Deprecated:** Capability to indicate if the user can change their display name.
Refer to `m.profile_fields` for extended profile management.

For backwards compatibility, servers that directly or indirectly include the
`displayname` profile field in the `m.profile_fields` capability MUST also
set this capability accordingly.
m.set_avatar_url:
deprecated: true
$ref: '#/components/schemas/booleanCapability'
description: Capability to indicate if the user can change their avatar.
description: |
**Deprecated:** Capability to indicate if the user can change their avatar.
Refer to `m.profile_fields` for extended profile management.

For backwards compatibility, servers that directly or indirectly include the
`avatar_url` profile field in the `m.profile_fields` capability MUST also
set this capability accordingly.
m.3pid_changes:
$ref: '#/components/schemas/booleanCapability'
description: Capability to indicate if the user can change 3PID associations
Expand All @@ -86,6 +100,47 @@ paths:
$ref: '#/components/schemas/booleanCapability'
description: Capability to indicate if the user can generate tokens to log further
clients into their account.
m.profile_fields:
x-addedInMatrixVersion: "1.16"
type: object
title: ProfileFieldsCapability
description: Capability to indicate if the user can set or modify extended profile fields via
[`PUT /_matrix/client/v3/profile/{userId}/{keyName}`](/client-server-api/#put_matrixclientv3profileuseridkeyname).
If absent, clients SHOULD assume custom profile fields are supported, provided the
homeserver advertises a specification version that includes `m.profile_fields` in the
[`/versions`](/client-server-api/#get_matrixclientversions) response.
properties:
allowed:
type: array
description: |
If present, a list of profile fields that clients are allowed to create, modify or delete,
provided `enabled` is `true`; no other profile fields may be changed.

If absent, clients may set all profile fields except those forbidden by the `disallowed`
list, where present.
items:
type: string
example:
- "m.example_field"
- "org.example.job_title"
disallowed:
type: array
description: |
This property has no meaning if `allowed` is also specified.

Otherwise, if present, a list of profile fields that clients are _not_ allowed to create, modify or delete.
Provided `enabled` is `true`, clients MAY assume that they can set any profile field which is not
included in this list.
items:
type: string
example:
- "org.example.managed_field"
enabled:
type: boolean
description: "`true` if the user can create, update or delete any profile fields, `false` otherwise."
example: true
required:
- enabled
examples:
response:
value: {
Expand Down
Loading