From 7dad9ebc43f8e7e4cf98934460c7cdcac004a3ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 30 Mar 2026 16:41:08 +0200 Subject: [PATCH] Clarify string format of filtering endpoints. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- data/api/client-server/definitions/event_filter.yaml | 4 ++++ data/api/client-server/definitions/room_event_filter.yaml | 4 ++++ data/api/client-server/definitions/sync_filter.yaml | 4 ++++ data/api/client-server/filter.yaml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/data/api/client-server/definitions/event_filter.yaml b/data/api/client-server/definitions/event_filter.yaml index ceb0d5bf..ad91e699 100644 --- a/data/api/client-server/definitions/event_filter.yaml +++ b/data/api/client-server/definitions/event_filter.yaml @@ -26,6 +26,8 @@ properties: `senders` filter. items: type: string + format: mx-user-id + pattern: "^@" type: array not_types: description: A list of event types to exclude. If this list is absent then no @@ -40,6 +42,8 @@ properties: senders are included. items: type: string + format: mx-user-id + pattern: "^@" type: array types: description: A list of event types to include. If this list is absent then all diff --git a/data/api/client-server/definitions/room_event_filter.yaml b/data/api/client-server/definitions/room_event_filter.yaml index 6c9b705d..de908a82 100644 --- a/data/api/client-server/definitions/room_event_filter.yaml +++ b/data/api/client-server/definitions/room_event_filter.yaml @@ -43,12 +43,16 @@ allOf: filter. items: type: string + format: mx-room-id + pattern: "^!" type: array rooms: description: A list of room IDs to include. If this list is absent then all rooms are included. items: type: string + format: mx-room-id + pattern: "^!" type: array contains_url: type: boolean diff --git a/data/api/client-server/definitions/sync_filter.yaml b/data/api/client-server/definitions/sync_filter.yaml index f181aa22..6f80b4c1 100644 --- a/data/api/client-server/definitions/sync_filter.yaml +++ b/data/api/client-server/definitions/sync_filter.yaml @@ -50,6 +50,8 @@ properties: `state`, `timeline` or `account_data` items: type: string + format: mx-room-id + pattern: "^!" type: array rooms: description: A list of room IDs to include. If this list is absent then all rooms @@ -57,6 +59,8 @@ properties: `state`, `timeline` or `account_data` items: type: string + format: mx-room-id + pattern: "^!" type: array ephemeral: allOf: diff --git a/data/api/client-server/filter.yaml b/data/api/client-server/filter.yaml index f1135939..551748d4 100644 --- a/data/api/client-server/filter.yaml +++ b/data/api/client-server/filter.yaml @@ -36,6 +36,8 @@ paths: example: "@alice:example.com" schema: type: string + format: mx-user-id + pattern: "^@" requestBody: content: application/json: @@ -130,6 +132,8 @@ paths: example: "@alice:example.com" schema: type: string + format: mx-user-id + pattern: "^@" - in: path name: filterId description: The filter ID to download.