|
| 1 | +# MSC3283: Expose enable_set_displayname, enable_set_avatar_url and enable_3pid_changes in capabilities response |
| 2 | + |
| 3 | +Some home servers like [Synapse](https://github.com/matrix-org/synapse/blob/756fd513dfaebddd28bf783eafa95b4505ce8745/docs/sample_config.yaml#L1207) |
| 4 | +can be configured to `enable_set_displayname: false`, `enable_set_avatar_url: false` or `enable_3pid_changes: false`. |
| 5 | +To enable clients to handle that gracefully in the UI this setting should be exposed. |
| 6 | + |
| 7 | +## Proposal |
| 8 | + |
| 9 | +The `/_matrix/client/r0/capabilities` endpoint should be decorated to provide more information on capabilities. |
| 10 | +```jsonc |
| 11 | +{ |
| 12 | + "capabilities": { |
| 13 | + "m.set_displayname": { "enabled": false }, |
| 14 | + "m.set_avatar_url": { "enabled": false }, |
| 15 | + "m.3pid_changes": { "enabled": false }, |
| 16 | + "m.room_versions": {...}, |
| 17 | + } |
| 18 | +} |
| 19 | +``` |
| 20 | +As part of this MSC, a capability for each setting will be added that exposes the server setting: |
| 21 | +- `m.set_displayname` |
| 22 | + |
| 23 | +Whether users are allowed to change their displayname after it has been initially set. |
| 24 | +Useful when provisioning users based on the contents of a third-party directory. |
| 25 | + |
| 26 | +- `m.set_avatar_url` |
| 27 | + |
| 28 | +Whether users are allowed to change their avatar after it has been initially set. |
| 29 | +Useful when provisioning users based on the contents of a third-party directory. |
| 30 | + |
| 31 | +- `m.3pid_changes` |
| 32 | + |
| 33 | +Whether users can change the 3PIDs associated with their accounts |
| 34 | +(email address and msisdn). |
| 35 | +Useful when provisioning users based on the contents of a third-party directory. |
| 36 | + |
| 37 | +## Client recommendations |
| 38 | +When presenting profile settings, clients should use capabilities in order to display the correct UI. |
| 39 | + |
| 40 | +Capability should always be present. |
| 41 | +Servers should always send these capabilities. If they aren't (because the server does not support |
| 42 | +a new enough spec version or for any other reason), clients should behave as if they were present and set to true. |
| 43 | + |
| 44 | +## Unstable prefix |
| 45 | + |
| 46 | +While this MSC is not considered stable, implementations should use `org.matrix.msc3283.` in place of `m.` throughout this proposal. |
0 commit comments