diff --git a/changelogs/client_server/newsfragments/2359.clarification b/changelogs/client_server/newsfragments/2359.clarification new file mode 100644 index 00000000..bdcce777 --- /dev/null +++ b/changelogs/client_server/newsfragments/2359.clarification @@ -0,0 +1 @@ +Clarify formats of string types. diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index b74a0ee2..6f43061c 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -4214,13 +4214,13 @@ an automatic propagation event to occur, informing likely-interested parties of the new values. This change is conveyed using two separate mechanisms: -- an `m.room.member` event (with a `join` membership) is sent to every - room the user is a member of, to update the `displayname` and +- an [`m.room.member`](#mroommember) event (with a `join` membership) is sent + to every room the user is a member of, to update the `displayname` and `avatar_url`. -- an `m.presence` presence status update is sent, again containing the - new values of the `displayname` and `avatar_url` keys, in addition - to the required `presence` key containing the current presence state - of the user. +- an [`m.presence`](#mpresence) presence status update is sent, again + containing the new values of the `displayname` and `avatar_url` keys, in + addition to the required `presence` key containing the current presence + state of the user. Both of these should be done automatically by the homeserver when a user successfully changes their display name or avatar URL fields. diff --git a/data/api/client-server/profile.yaml b/data/api/client-server/profile.yaml index 4e34503a..5e66f1a9 100644 --- a/data/api/client-server/profile.yaml +++ b/data/api/client-server/profile.yaml @@ -46,6 +46,8 @@ paths: example: "@alice:example.com" schema: type: string + format: mx-user-id + pattern: "^@" - in: path name: keyName description: The name of the profile field to set. This MUST be either @@ -69,11 +71,11 @@ paths: description: | An object which contains exactly one property. The key of that property MUST match the `keyName` specified in the URL. - - For `avatar_url`, the value MUST be an MXC URI string. - + + For `avatar_url`, the value MUST be an MXC URI string. + For `displayname`, the value MUST be a string. - + For `m.tz`, the value MUST be a valid identifier from the [IANA Time Zone Database](https://www.iana.org/time-zones). Servers MAY choose to validate the value. Clients MUST expect unknown or invalid values. @@ -96,7 +98,7 @@ paths: description: | The input was invalid in some way. This can include one of the following error codes: - + - `M_BAD_JSON`: The provided value is not valid JSON. - `M_MISSING_PARAM`: The required `keyName` property is missing from the request body. @@ -158,6 +160,8 @@ paths: example: "@alice:example.com" schema: type: string + format: mx-user-id + pattern: "^@" - in: path name: keyName description: The name of the profile field to retrieve. @@ -216,6 +220,8 @@ paths: example: "@alice:example.com" schema: type: string + format: mx-user-id + pattern: "^@" - in: path name: keyName description: The name of the profile field to delete. @@ -286,6 +292,8 @@ paths: example: "@alice:example.com" schema: type: string + format: mx-user-id + pattern: "^@" responses: "200": description: The profile information for this user. diff --git a/data/api/client-server/users.yaml b/data/api/client-server/users.yaml index c1f3c6c8..79906820 100644 --- a/data/api/client-server/users.yaml +++ b/data/api/client-server/users.yaml @@ -30,7 +30,7 @@ paths: `public` [join rule](#mroomjoin_rules) - users who are joined to rooms known to the homeserver that have a `world_readable` [history visibility](#room-history-visibility) - + The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search. @@ -82,6 +82,8 @@ paths: type: string example: "@foo:bar.com" description: The user's matrix user ID. + format: mx-user-id + pattern: "^@" display_name: type: string example: Foo