mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-05-01 22:54:10 +02:00
Compare commits
5 commits
8478bad325
...
349172b0a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
349172b0a1 | ||
|
|
fea0b925a0 | ||
|
|
bfbeb5e257 | ||
|
|
3c17aa3789 | ||
|
|
506bc1a164 |
|
|
@ -1 +1 @@
|
||||||
Update user profile endpoints to handle custom fields, and add a new `m.profile_fields` capability,as per [MSC4133](https://github.com/matrix-org/matrix-spec-proposals/pull/4133).
|
Update user profile endpoints to handle custom fields, and add a new `m.profile_fields` capability, as per [MSC4133](https://github.com/matrix-org/matrix-spec-proposals/pull/4133).
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
Clarify that the stripped state in `invite_state` and `knock_state` in `GET /sync` response must
|
||||||
|
include the full `m.room.member` event of the user.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify wording around the `world_readable` history visibility setting. Contributed by @HarHarLinks.
|
||||||
1
changelogs/client_server/newsfragments/2206.feature
Normal file
1
changelogs/client_server/newsfragments/2206.feature
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Add a profile field for a user's time zone, per [MSC4175](https://github.com/matrix-org/matrix-spec-proposals/pull/4175).
|
||||||
|
|
@ -16,8 +16,8 @@ The four options for the `m.room.history_visibility` event are:
|
||||||
|
|
||||||
- `world_readable` - All events while this is the
|
- `world_readable` - All events while this is the
|
||||||
`m.room.history_visibility` value may be shared by any participating
|
`m.room.history_visibility` value may be shared by any participating
|
||||||
homeserver with anyone, regardless of whether they have ever joined
|
homeserver with any authenticated user, regardless of whether they have
|
||||||
the room.
|
ever joined the room. This includes [guest users](#guest-access).
|
||||||
- `shared` - Previous events are always accessible to newly joined
|
- `shared` - Previous events are always accessible to newly joined
|
||||||
members. All events in the room are accessible, even those sent when
|
members. All events in the room are accessible, even those sent when
|
||||||
the member was not a part of the room.
|
the member was not a part of the room.
|
||||||
|
|
@ -44,7 +44,7 @@ setting at that time was more restrictive.
|
||||||
#### Client behaviour
|
#### Client behaviour
|
||||||
|
|
||||||
Clients may want to display a notice that events may be read by
|
Clients may want to display a notice that events may be read by
|
||||||
non-joined people if the history visibility is set to `world_readable`.
|
non-joined users if the history visibility is set to `world_readable`.
|
||||||
|
|
||||||
#### Server behaviour
|
#### Server behaviour
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ It is sometimes desirable to offer a preview of a room, where a user can
|
||||||
This can be particularly effective when combined with [Guest Access](#guest-access).
|
This can be particularly effective when combined with [Guest Access](#guest-access).
|
||||||
|
|
||||||
Previews are implemented via the `world_readable` [Room History
|
Previews are implemented via the `world_readable` [Room History
|
||||||
Visibility](#room-history-visibility). setting, along with a special version of the [GET
|
Visibility](#room-history-visibility) setting, along with a special version of the [GET
|
||||||
/events](#get_matrixclientv3events) endpoint.
|
/events](#get_matrixclientv3events) endpoint.
|
||||||
|
|
||||||
#### Client behaviour
|
#### Client behaviour
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ properties:
|
||||||
example: "All things general"
|
example: "All things general"
|
||||||
world_readable:
|
world_readable:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Whether the room may be viewed by guest users without joining.
|
description: Whether the room may be viewed by users without joining.
|
||||||
example: false
|
example: false
|
||||||
guest_can_join:
|
guest_can_join:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ paths:
|
||||||
"/profile/{userId}/{keyName}":
|
"/profile/{userId}/{keyName}":
|
||||||
put:
|
put:
|
||||||
x-changedInMatrixVersion:
|
x-changedInMatrixVersion:
|
||||||
"1.16": This endpoint now accepts a variable `keyName` parameter. Previously only `displayname` and `avatar_url` were accepted.
|
"1.16": This endpoint now accepts a variable `keyName` parameter and `m.tz` was added as a defined key. Previously only `displayname` and `avatar_url` were accepted.
|
||||||
summary: Set a profile field for a user.
|
summary: Set a profile field for a user.
|
||||||
description: |-
|
description: |-
|
||||||
Set or update a profile field for a user. Must be authenticated with an
|
Set or update a profile field for a user. Must be authenticated with an
|
||||||
|
|
@ -44,13 +44,13 @@ paths:
|
||||||
- in: path
|
- in: path
|
||||||
name: keyName
|
name: keyName
|
||||||
description: The name of the profile field to set. This MUST be either
|
description: The name of the profile field to set. This MUST be either
|
||||||
`avatar_url`, `displayname`, or a custom field following the
|
`avatar_url`, `displayname`, `m.tz`, or a custom field following the
|
||||||
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
|
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
|
||||||
required: true
|
required: true
|
||||||
example: "displayname"
|
example: "displayname"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
|
pattern: '^(avatar_url|displayname|m\.tz|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
|
||||||
requestBody:
|
requestBody:
|
||||||
description: A JSON object containing the property whose name matches
|
description: A JSON object containing the property whose name matches
|
||||||
the `keyName` specified in the URL. See `additionalProperties` for
|
the `keyName` specified in the URL. See `additionalProperties` for
|
||||||
|
|
@ -69,6 +69,10 @@ paths:
|
||||||
|
|
||||||
For `displayname`, the value MUST be a 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.
|
||||||
|
|
||||||
For custom keys, any JSON type is allowed. Servers MAY not validate
|
For custom keys, any JSON type is allowed. Servers MAY not validate
|
||||||
these values, but clients SHOULD follow the format defined for that key.
|
these values, but clients SHOULD follow the format defined for that key.
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
|
@ -137,7 +141,7 @@ paths:
|
||||||
- User data
|
- User data
|
||||||
get:
|
get:
|
||||||
x-changedInMatrixVersion:
|
x-changedInMatrixVersion:
|
||||||
"1.16": This endpoint now accepts a variable `keyName` parameter. Previously only `displayname` and `avatar_url` were accepted.
|
"1.16": This endpoint now accepts a variable `keyName` parameter and `m.tz` was added as a defined key. Previously only `displayname` and `avatar_url` were accepted.
|
||||||
summary: Get a profile field for a user.
|
summary: Get a profile field for a user.
|
||||||
description: Get the value of a profile field for a user.
|
description: Get the value of a profile field for a user.
|
||||||
operationId: getProfileField
|
operationId: getProfileField
|
||||||
|
|
@ -156,7 +160,7 @@ paths:
|
||||||
example: "displayname"
|
example: "displayname"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
|
pattern: '^(avatar_url|displayname|m\.tz|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The profile field value was retrieved.
|
description: The profile field value was retrieved.
|
||||||
|
|
@ -214,7 +218,7 @@ paths:
|
||||||
example: "displayname"
|
example: "displayname"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
|
pattern: '^(avatar_url|displayname|m\.tz|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The profile field was deleted or it doesn't exist.
|
description: The profile field was deleted or it doesn't exist.
|
||||||
|
|
@ -293,6 +297,10 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
description: The user's display name if they have set one, otherwise not
|
description: The user's display name if they have set one, otherwise not
|
||||||
present.
|
present.
|
||||||
|
m.tz:
|
||||||
|
x-addedInMatrixVersion: "1.16"
|
||||||
|
type: string
|
||||||
|
description: The user's time zone.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
x-addedInMatrixVersion: "1.16"
|
x-addedInMatrixVersion: "1.16"
|
||||||
description: Additional profile fields.
|
description: Additional profile fields.
|
||||||
|
|
@ -302,6 +310,7 @@ paths:
|
||||||
{
|
{
|
||||||
"avatar_url": "mxc://matrix.org/SDGdghriugerRg",
|
"avatar_url": "mxc://matrix.org/SDGdghriugerRg",
|
||||||
"displayname": "Alice Margatroid",
|
"displayname": "Alice Margatroid",
|
||||||
|
"m.tz": "Europe/London",
|
||||||
"m.example_field": "custom_value",
|
"m.example_field": "custom_value",
|
||||||
}
|
}
|
||||||
"403":
|
"403":
|
||||||
|
|
|
||||||
|
|
@ -369,8 +369,14 @@ paths:
|
||||||
description: |-
|
description: |-
|
||||||
The [stripped state events](/client-server-api/#stripped-state) that form the
|
The [stripped state events](/client-server-api/#stripped-state) that form the
|
||||||
invite state.
|
invite state.
|
||||||
|
|
||||||
|
MUST also include the `m.room.member` event of the user with a membership of
|
||||||
|
`invite`, and using the same event format as joined rooms with the `event_id`
|
||||||
|
and `origin_server_ts` fields.
|
||||||
items:
|
items:
|
||||||
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
|
anyOf:
|
||||||
|
- $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
|
||||||
|
- $ref: definitions/client_event_without_room_id.yaml
|
||||||
type: array
|
type: array
|
||||||
knock:
|
knock:
|
||||||
title: Knocked rooms
|
title: Knocked rooms
|
||||||
|
|
@ -394,8 +400,14 @@ paths:
|
||||||
description: |-
|
description: |-
|
||||||
The [stripped state events](/client-server-api/#stripped-state) that form the
|
The [stripped state events](/client-server-api/#stripped-state) that form the
|
||||||
knock state.
|
knock state.
|
||||||
|
|
||||||
|
MUST also include the `m.room.member` event of the user with a membership of
|
||||||
|
`knock`, and using the same event format as joined rooms with the `event_id` and
|
||||||
|
`origin_server_ts` fields.
|
||||||
items:
|
items:
|
||||||
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
|
anyOf:
|
||||||
|
- $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
|
||||||
|
- $ref: definitions/client_event_without_room_id.yaml
|
||||||
type: array
|
type: array
|
||||||
leave:
|
leave:
|
||||||
title: Left rooms
|
title: Left rooms
|
||||||
|
|
@ -628,6 +640,8 @@ paths:
|
||||||
"sender": "@alice:example.com",
|
"sender": "@alice:example.com",
|
||||||
"type": "m.room.member",
|
"type": "m.room.member",
|
||||||
"state_key": "@bob:example.com",
|
"state_key": "@bob:example.com",
|
||||||
|
"event_id": "$19dl9d3848dJLle:example.com",
|
||||||
|
"origin_server_ts": 1432735439654,
|
||||||
"content": {
|
"content": {
|
||||||
"membership": "invite"
|
"membership": "invite"
|
||||||
}
|
}
|
||||||
|
|
@ -652,6 +666,8 @@ paths:
|
||||||
"sender": "@bob:example.com",
|
"sender": "@bob:example.com",
|
||||||
"type": "m.room.member",
|
"type": "m.room.member",
|
||||||
"state_key": "@bob:example.com",
|
"state_key": "@bob:example.com",
|
||||||
|
"event_id": "$Fg83Kl3764di23a:example.com",
|
||||||
|
"origin_server_ts": 143273039402,
|
||||||
"content": {
|
"content": {
|
||||||
"membership": "knock"
|
"membership": "knock"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue