mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-03 10:14:10 +01:00
Compare commits
6 commits
d2cf7db161
...
2b33482087
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b33482087 | ||
|
|
86358e7e17 | ||
|
|
a678f0b52b | ||
|
|
fea0b925a0 | ||
|
|
bfbeb5e257 | ||
|
|
d1a51f7b8c |
|
|
@ -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 @@
|
|||
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).
|
||||
1
changelogs/internal/newsfragments/2205.clarification
Normal file
1
changelogs/internal/newsfragments/2205.clarification
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fix a grammatical typo on the Matrix Spec Process documentation page.
|
||||
|
|
@ -2810,7 +2810,7 @@ fresh state can be acquired from a join.
|
|||
Stripped state should contain some or all of the following state events, which
|
||||
should be represented as stripped state events when possible:
|
||||
|
||||
* [`m.room.create`](#mroomcreate) ({{% changed-in v="1.16" %}} required on invites and knocks)
|
||||
* [`m.room.create`](#mroomcreate)
|
||||
* [`m.room.name`](#mroomname)
|
||||
* [`m.room.avatar`](#mroomavatar)
|
||||
* [`m.room.topic`](#mroomtopic)
|
||||
|
|
@ -2818,6 +2818,14 @@ should be represented as stripped state events when possible:
|
|||
* [`m.room.canonical_alias`](#mroomcanonical_alias)
|
||||
* [`m.room.encryption`](#mroomencryption)
|
||||
|
||||
{{% changed-in v="1.16" %}} The `m.room.create` event is now **required** in
|
||||
the following places:
|
||||
* [`invite_state`](#get_matrixclientv3sync_response-200_invited-room) and
|
||||
[`knock_state`](#get_matrixclientv3sync_response-200_knocked-room) on
|
||||
[`/sync`](#get_matrixclientv3sync) responses.
|
||||
* When present on [`m.room.member`](#mroommember) events, the `invite_room_state`
|
||||
and `knock_room_state` under `unsigned` on the event.
|
||||
|
||||
{{% boxes/note %}}
|
||||
Clients should inspect the list of stripped state events and not assume any
|
||||
particular event is present. The server might include events not described
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ The four options for the `m.room.history_visibility` event are:
|
|||
|
||||
- `world_readable` - All events while this is the
|
||||
`m.room.history_visibility` value may be shared by any participating
|
||||
homeserver with anyone, regardless of whether they have ever joined
|
||||
the room.
|
||||
homeserver with any authenticated user, regardless of whether they have
|
||||
ever joined the room. This includes [guest users](#guest-access).
|
||||
- `shared` - Previous events are always accessible to newly joined
|
||||
members. All events in the room are accessible, even those sent when
|
||||
the member was not a part of the room.
|
||||
|
|
@ -44,7 +44,7 @@ setting at that time was more restrictive.
|
|||
#### Client behaviour
|
||||
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
||||
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.
|
||||
|
||||
#### Client behaviour
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ resolve to the desired MSC, whether it started as an issue or a PR.
|
|||
Other metadata:
|
||||
|
||||
- The MSC number is taken from the GitHub Pull Request ID. This is
|
||||
carried for the lifetime of the proposal. These IDs do not necessary
|
||||
carried for the lifetime of the proposal. These IDs do not necessarily
|
||||
represent a chronological order.
|
||||
- The GitHub PR title will act as the MSC's title.
|
||||
- Please link to the spec PR (if any) by adding a "PRs: \#1234" line
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ properties:
|
|||
example: "All things general"
|
||||
world_readable:
|
||||
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
|
||||
guest_can_join:
|
||||
type: boolean
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ paths:
|
|||
"/profile/{userId}/{keyName}":
|
||||
put:
|
||||
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.
|
||||
description: |-
|
||||
Set or update a profile field for a user. Must be authenticated with an
|
||||
|
|
@ -44,13 +44,13 @@ paths:
|
|||
- in: path
|
||||
name: keyName
|
||||
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).
|
||||
required: true
|
||||
example: "displayname"
|
||||
schema:
|
||||
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:
|
||||
description: A JSON object containing the property whose name matches
|
||||
the `keyName` specified in the URL. See `additionalProperties` for
|
||||
|
|
@ -69,6 +69,10 @@ paths:
|
|||
|
||||
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
|
||||
these values, but clients SHOULD follow the format defined for that key.
|
||||
additionalProperties: true
|
||||
|
|
@ -137,7 +141,7 @@ paths:
|
|||
- User data
|
||||
get:
|
||||
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.
|
||||
description: Get the value of a profile field for a user.
|
||||
operationId: getProfileField
|
||||
|
|
@ -156,7 +160,7 @@ paths:
|
|||
example: "displayname"
|
||||
schema:
|
||||
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:
|
||||
"200":
|
||||
description: The profile field value was retrieved.
|
||||
|
|
@ -214,7 +218,7 @@ paths:
|
|||
example: "displayname"
|
||||
schema:
|
||||
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:
|
||||
"200":
|
||||
description: The profile field was deleted or it doesn't exist.
|
||||
|
|
@ -293,6 +297,10 @@ paths:
|
|||
type: string
|
||||
description: The user's display name if they have set one, otherwise not
|
||||
present.
|
||||
m.tz:
|
||||
x-addedInMatrixVersion: "1.16"
|
||||
type: string
|
||||
description: The user's time zone.
|
||||
additionalProperties:
|
||||
x-addedInMatrixVersion: "1.16"
|
||||
description: Additional profile fields.
|
||||
|
|
@ -302,6 +310,7 @@ paths:
|
|||
{
|
||||
"avatar_url": "mxc://matrix.org/SDGdghriugerRg",
|
||||
"displayname": "Alice Margatroid",
|
||||
"m.tz": "Europe/London",
|
||||
"m.example_field": "custom_value",
|
||||
}
|
||||
"403":
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ paths:
|
|||
version - check the [room version specification](/rooms) for
|
||||
precise event formats.
|
||||
example:
|
||||
$ref: ./examples/stripped_state.json
|
||||
$ref: ./examples/invite_or_knock_state.json
|
||||
type: object
|
||||
required: true
|
||||
responses:
|
||||
|
|
@ -139,7 +139,7 @@ paths:
|
|||
"origin_server_ts": 1549041175876,
|
||||
"sender": "@someone:example.org",
|
||||
"unsigned": {
|
||||
"invite_room_state": {"$ref": "./examples/stripped_state.json"}
|
||||
"invite_room_state": {"$ref": "./examples/invite_or_knock_state.json"}
|
||||
},
|
||||
"content": {
|
||||
"membership": "invite"
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ paths:
|
|||
version - check the [room version specification](/rooms) for
|
||||
precise event formats.
|
||||
example:
|
||||
$ref: ./examples/stripped_state.json
|
||||
$ref: ./examples/invite_or_knock_state.json
|
||||
required:
|
||||
- room_version
|
||||
- event
|
||||
|
|
@ -132,7 +132,7 @@ paths:
|
|||
"origin_server_ts": 1549041175876,
|
||||
"sender": "@someone:example.org",
|
||||
"unsigned": {
|
||||
"invite_room_state": {"$ref": "./examples/stripped_state.json"}
|
||||
"invite_room_state": {"$ref": "./examples/invite_or_knock_state.json"}
|
||||
},
|
||||
"content": {
|
||||
"membership": "invite"
|
||||
|
|
|
|||
|
|
@ -319,14 +319,14 @@ paths:
|
|||
version - check the [room version specification](/rooms) for
|
||||
precise event formats.
|
||||
example:
|
||||
"$ref": "./examples/stripped_state.json"
|
||||
"$ref": "./examples/invite_or_knock_state.json"
|
||||
required:
|
||||
- knock_room_state
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"knock_room_state": {
|
||||
"$ref": "./examples/stripped_state.json"
|
||||
"$ref": "./examples/invite_or_knock_state.json"
|
||||
}
|
||||
}
|
||||
"403":
|
||||
|
|
|
|||
Loading…
Reference in a new issue