@@ -2491,8 +2491,66 @@ using an `unstable` version.
24912491When this capability is not listed, clients should use ` "1" ` as the
24922492default and only stable ` available ` room version.
24932493
2494+ ### ` m.profile_fields ` capability
2495+
2496+ {{% added-in v="1.16" %}}
2497+
2498+ This capability defines which [ profile] ( #profiles ) fields the user is
2499+ able to change.
2500+
2501+ The capability value has a required flag, ` enabled ` , and two optional lists, ` allowed ` and
2502+ ` disallowed ` .
2503+
2504+ When ` enabled ` is ` false ` , all profile fields are managed by the server
2505+ and the client is not permitted to make any changes.
2506+
2507+ When ` enabled ` is ` true ` , clients are permitted to modify profile fields,
2508+ subject to the restrictions implied by the OPTIONAL lists ` allowed ` and
2509+ ` disallowed ` .
2510+
2511+ If ` allowed ` is present, clients can modify only the fields
2512+ listed. They SHOULD assume all other fields to be managed by
2513+ the server. In this case, ` disallowed ` has no meaning and should be ignored.
2514+
2515+ If ` disallowed ` is present (and ` allowed ` is not), clients SHOULD assume
2516+ that the listed fields are managed by the server. Clients may modify any
2517+ fields that are * not* listed, provided ` enabled ` is ` true ` .
2518+
2519+ If neither ` allowed ` nor ` disallowed ` is present, clients can modify all fields
2520+ without restrictions, provided ` enabled ` is ` true ` .
2521+
2522+ When this capability is not listed, clients SHOULD assume the user is able to change
2523+ profile fields without any restrictions, provided the homeserver
2524+ advertises a specification version that includes the ` m.profile_fields `
2525+ capability in the [ ` /versions ` ] ( /client-server-api/#get_matrixclientversions )
2526+ response.
2527+
2528+ An example of the capability API's response for this capability is:
2529+
2530+ ``` json
2531+ {
2532+ "capabilities" : {
2533+ "m.profile_fields" : {
2534+ "enabled" : true ,
2535+ "disallowed" : [" displayname" ]
2536+ }
2537+ }
2538+ }
2539+ ```
2540+
24942541### ` m.set_displayname ` capability
24952542
2543+ {{% boxes/note %}}
2544+ {{% changed-in v="1.16" %}}
2545+ This capability is now deprecated. Clients SHOULD use the
2546+ [ ` m.profile_fields ` ] ( /client-server-api/#mprofile_fields-capability )
2547+ capability instead.
2548+
2549+ For backwards compatibility, servers that forbid setting the
2550+ ` displayname ` profile field in the ` m.profile_fields ` capability
2551+ MUST still present this capability with ` "enabled": false ` .
2552+ {{% /boxes/note %}}
2553+
24962554This capability has a single flag, ` enabled ` , to denote whether the user
24972555is able to change their own display name via profile endpoints. Cases for
24982556disabling might include users mapped from external identity/directory
@@ -2517,6 +2575,17 @@ An example of the capability API's response for this capability is:
25172575
25182576### ` m.set_avatar_url ` capability
25192577
2578+ {{% boxes/note %}}
2579+ {{% changed-in v="1.16" %}}
2580+ This capability is now deprecated. Clients SHOULD use the
2581+ [ ` m.profile_fields ` ] ( /client-server-api/#mprofile_fields-capability )
2582+ capability instead.
2583+
2584+ For backwards compatibility, servers that forbid setting the
2585+ ` avatar_url ` profile field in the ` m.profile_fields ` capability
2586+ MUST still present this capability with ` "enabled": false ` .
2587+ {{% /boxes/note %}}
2588+
25202589This capability has a single flag, ` enabled ` , to denote whether the user
25212590is able to change their own avatar via profile endpoints. Cases for
25222591disabling might include users mapped from external identity/directory
0 commit comments