-
-
Notifications
You must be signed in to change notification settings - Fork 115
MSC4133: Update profile endpoints to support extended fields #2071
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
base: main
Are you sure you want to change the base?
Changes from all commits
fdc012a
212377e
1fc0118
b2e122f
59d2c62
ee9b5dd
8e9874a
41c64c8
82adcec
4f8999b
992cf9d
3311b08
f3c269d
9327793
5d5b561
76b48e2
79a1cde
17af55d
79af780
1cc93ec
0b0942d
7a3b0c0
9859e20
013502b
9889fe3
3a5e555
7ef1d9d
b5e2edf
d8cc250
37b1362
50eab35
dd4ea94
6183f24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* [GET /devices](#get_matrixclientv3devices) | ||||||
* [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid) | ||||||
* [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could do with corresponding updates to the text sections that describe the capabilites: https://pr2071--matrix-spec-previews.netlify.app/client-server-api/#mset_displayname-capability, https://pr2071--matrix-spec-previews.netlify.app/client-server-api/#mset_avatar_url-capability |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -73,11 +73,17 @@ paths: | |||||||||
- default | ||||||||||
tcpipuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
- 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. | ||||||||||
Please refer to `m.profile_fields` for extended profile management. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
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. | ||||||||||
Please refer to `m.profile_fields` for extended profile management. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
m.3pid_changes: | ||||||||||
$ref: '#/components/schemas/booleanCapability' | ||||||||||
description: Capability to indicate if the user can change 3PID associations | ||||||||||
|
@@ -86,6 +92,37 @@ 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.14" | ||||||||||
type: object | ||||||||||
title: ProfileFieldsCapability | ||||||||||
description: Capability to indicate if the user can set or modify extended profile fields. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
If absent, clients should assume custom profile fields are supported. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
properties: | ||||||||||
allowed: | ||||||||||
type: array | ||||||||||
description: List of allowed additional custom profile field keys. A `*` can be used as a | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. additional to what? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, |
||||||||||
wildcard to match any sequence of characters. This list takes precedence over the | ||||||||||
Comment on lines
+104
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Wait, where did this come from? This wasn't in the MSC, was it? Wildcarding opens up a whole new set of questions that I don't think we want to deal with. |
||||||||||
disallowed list if both are provided. | ||||||||||
items: | ||||||||||
type: string | ||||||||||
example: | ||||||||||
- "m.example_field" | ||||||||||
- "org.example/job_title" | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this doesn't look like a valid Common Namespaced Identifier Grammar identifier, and is therefore not a great example? |
||||||||||
disallowed: | ||||||||||
type: array | ||||||||||
description: List of disallowed additional custom profile field keys. A `*` can be used as | ||||||||||
a wildcard to match any sequence of characters. Ignored if an allowed list 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. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
example: true | ||||||||||
required: | ||||||||||
- enabled | ||||||||||
examples: | ||||||||||
response: | ||||||||||
value: { | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see this has gone through a bit of iteration, so apologies for the back-and-forth, but honestly this feels rather wordy for a changelog entry. Take a look at the examples in https://spec.matrix.org/v1.14/changelog/v1.14/ (and previous versions): there are very few that run to more than a single sentence; if people want more details about what's actually changing they can easily click through to the PR; and the body of the spec contains "Changed in v1.14" notes.
I think a good trick here would be to have two separate changelog entries; so here, we want something like:
... and then in
changelogs/client_server/newsfragments/2071.deprecation
, we want: