Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC4133: Update profile endpoints to support extended fields #2071

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
33 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
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.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feature: Update profile endpoints to become generic to support [MSC4133](https://github.com/matrix-org/matrix-spec-proposals/pull/4133) extended fields. Extended profile fields are now supported via the new `m.profile_fields` capability, which deprecates the previous `m.set_avatar_url` and `m.set_displayname` capabilities. Stabilised keys are explicitly enumerated, and custom keys must conform to the Common Namespaced Identifier Grammar.
2 changes: 1 addition & 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,7 @@ 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}/{key_name}](#put_matrixclientv3profileuseridkeyname)
* [GET /devices](#get_matrixclientv3devices)
* [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid)
* [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid)
Expand Down
37 changes: 35 additions & 2 deletions data/api/client-server/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ 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.
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.
m.3pid_changes:
$ref: '#/components/schemas/booleanCapability'
description: Capability to indicate if the user can change 3PID associations
Expand All @@ -86,6 +88,10 @@ 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:
$ref: "#/components/schemas/profileFieldsCapability"
description: Capability to indicate if the user can set or modify extended profile fields.
If absent, clients should assume custom profile fields are supported.
examples:
response:
value: {
Expand Down Expand Up @@ -144,3 +150,30 @@ components:
example: false
required:
- enabled
profileFieldsCapability:
type: object
title: ProfileFieldsCapability
properties:
allowed:
type: array
description: List of allowed custom profile field keys,
supporting `glob.*` wildcard format. Takes precedence over disallowed if both are provided.
items:
type: string
example:
- "m.example_field"
- "org.example.job_title"
disallowed:
type: array
description: List of disallowed custom profile field keys,
supporting `glob.*` wildcard format. Ignored if allowed is provided.
items:
type: string
example:
- "org.example.secret_field"
enabled:
type: boolean
description: True if the user can set or modify any extended profile fields, false otherwise.
example: true
required:
- enabled
Loading