From 41bc09ea22e8b18d0e509e666e30033dd3143e04 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Mon, 28 Sep 2015 13:20:01 +0100 Subject: [PATCH] Split the event_filter into a event_filter and a room_event_filter that extends it. So that we don't include "rooms" and "not_rooms" keys for the public_user_data and private_user_data filters. --- .../v2_alpha/definitions/event_filter.json | 16 -------------- .../definitions/room_event_filter.json | 21 +++++++++++++++++++ .../v2_alpha/definitions/sync_filter.json | 6 +++--- 3 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 api/client-server/v2_alpha/definitions/room_event_filter.json diff --git a/api/client-server/v2_alpha/definitions/event_filter.json b/api/client-server/v2_alpha/definitions/event_filter.json index 76d8be64..c15b8133 100644 --- a/api/client-server/v2_alpha/definitions/event_filter.json +++ b/api/client-server/v2_alpha/definitions/event_filter.json @@ -37,22 +37,6 @@ "items": { "type": "string" } - }, - "rooms": { - "type": "array", - "description": - "A list of room IDs to include. If this list is absent then all rooms are included.", - "items": { - "type": "string" - } - }, - "not_rooms": { - "type": "array", - "description": - "A list of room IDs to exclude. If this list is absent then no rooms are excluded.", - "items": { - "type": "string" - } } } } diff --git a/api/client-server/v2_alpha/definitions/room_event_filter.json b/api/client-server/v2_alpha/definitions/room_event_filter.json new file mode 100644 index 00000000..c234448e --- /dev/null +++ b/api/client-server/v2_alpha/definitions/room_event_filter.json @@ -0,0 +1,21 @@ +{ + "type": "object", + "properties": { + "rooms": { + "type": "array", + "description": + "A list of room IDs to include. If this list is absent then all rooms are included.", + "items": { + "type": "string" + } + }, + "not_rooms": { + "type": "array", + "description": + "A list of room IDs to exclude. If this list is absent then no rooms are excluded.", + "items": { + "type": "string" + } + } + } +} diff --git a/api/client-server/v2_alpha/definitions/sync_filter.json b/api/client-server/v2_alpha/definitions/sync_filter.json index bfc8b51d..4ad3aa82 100644 --- a/api/client-server/v2_alpha/definitions/sync_filter.json +++ b/api/client-server/v2_alpha/definitions/sync_filter.json @@ -7,17 +7,17 @@ "state": { "description": "The state events to include for rooms.", - "allOf": [{"$ref": "definitions/event_filter.json"}] + "allOf": [{"$ref": "definitions/room_event_filter.json"}] }, "timeline": { "description": "The message and state update events to include for rooms.", - "allOf": [{"$ref": "definitions/event_filter.json"}] + "allOf": [{"$ref": "definitions/room_event_filter.json"}] }, "ephemeral": { "description": "The events that aren't recorded in the room history, e.g. typing and receipts, to include for rooms.", - "allOf": [{"$ref": "definitions/event_filter.json"}] + "allOf": [{"$ref": "definitions/room_event_filter.json"}] } } },