From f8119f5336fa013365821f69201c720d25b634af Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:11:39 +0000 Subject: [PATCH] Remove distinction between `StateFilter` and `RoomEventFilter` (#2015) They are exactly the same type, so let's combine their tables together. --- .../client_server/newsfragments/2015.clarification | 1 + content/client-server-api/_index.md | 9 +++++---- data/api/client-server/definitions/sync_filter.yaml | 1 - data/api/client-server/sync.yaml | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 changelogs/client_server/newsfragments/2015.clarification diff --git a/changelogs/client_server/newsfragments/2015.clarification b/changelogs/client_server/newsfragments/2015.clarification new file mode 100644 index 00000000..1952e036 --- /dev/null +++ b/changelogs/client_server/newsfragments/2015.clarification @@ -0,0 +1 @@ +Remove distinction between `StateFilter` and `RoomEventFilter`. diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index bfcbd031..20fc9de5 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -29,7 +29,7 @@ JSON object. Clients should supply a `Content-Type` header of The exceptions are: -- [`POST /_matrix/media/v3/upload`](#post_matrixmediav3upload) and +- [`POST /_matrix/media/v3/upload`](#post_matrixmediav3upload) and [`PUT /_matrix/media/v3/upload/{serverName}/{mediaId}`](#put_matrixmediav3uploadservernamemediaid), both of which take the uploaded media as the request body. - [`POST /_matrix/client/v3/logout`](#post_matrixclientv3logout) and @@ -1471,7 +1471,7 @@ Content-Type: application/json ``` Servers SHOULD NOT invalidate access tokens on locked accounts unless the -client requests a logout (using the above endpoints). This ensures that +client requests a logout (using the above endpoints). This ensures that users can retain their sessions without having to log back in if the account becomes unlocked. @@ -1756,8 +1756,9 @@ events to the client to ease implementation, although such redundancy should be minimised where possible to conserve bandwidth. In terms of filters, lazy-loading is enabled by enabling -`lazy_load_members` on a `RoomEventFilter` (or a `StateFilter` in the -case of `/sync` only). When enabled, lazy-loading aware endpoints (see +`lazy_load_members` on a +[`RoomEventFilter`](#post_matrixclientv3useruseridfilter_request_roomeventfilter). +When enabled, lazy-loading aware endpoints (see below) will only include membership events for the `sender` of events being included in the response. For example, if a client makes a `/sync` request with lazy-loading enabled, the server will only return diff --git a/data/api/client-server/definitions/sync_filter.yaml b/data/api/client-server/definitions/sync_filter.yaml index 1b98db1f..75544e94 100644 --- a/data/api/client-server/definitions/sync_filter.yaml +++ b/data/api/client-server/definitions/sync_filter.yaml @@ -69,7 +69,6 @@ properties: type: boolean state: type: object - title: StateFilter allOf: - $ref: room_event_filter.yaml description: The state events to include for rooms. diff --git a/data/api/client-server/sync.yaml b/data/api/client-server/sync.yaml index 1122f28f..9d9a807d 100644 --- a/data/api/client-server/sync.yaml +++ b/data/api/client-server/sync.yaml @@ -26,7 +26,8 @@ paths: incremental deltas to the state, and to receive new messages. *Note*: This endpoint supports lazy-loading. See [Filtering](/client-server-api/#filtering) - for more information. Lazy-loading members is only supported on a `StateFilter` + for more information. Lazy-loading members is only supported on the `state` part of a + [`RoomFilter`](#post_matrixclientv3useruseridfilter_request_roomfilter) for this endpoint. When lazy-loading is enabled, servers MUST include the syncing user's own membership event when they join a room, or when the full state of rooms is requested, to aid discovering the user's avatar &