diff options
author | Eisha Chen-yen-su <chenyensu0@gmail.com> | 2019-05-30 16:58:53 +0200 |
---|---|---|
committer | Eisha Chen-yen-su <chenyensu0@gmail.com> | 2019-05-30 16:58:53 +0200 |
commit | 8824325b829baa5262242a50d0ea2c9b738feb78 (patch) | |
tree | b845fcd16cdbbaa23e626734da0b2df03f31f65e /synapse/rest | |
parent | Merge pull request #5291 from matrix-org/erikj/add_index (diff) | |
download | synapse-8824325b829baa5262242a50d0ea2c9b738feb78.tar.xz |
Fix ignored filter field in `/messages` endpoint
This fixes a bug which were causing the "event_format" field to be ignored in the filter of requests to the `/messages` endpoint of the CS API. Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v1/room.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 255a85c588..b92c6a9a9c 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -475,6 +475,8 @@ class RoomMessageListRestServlet(ClientV1RestServlet): if filter_bytes: filter_json = urlparse.unquote(filter_bytes.decode("UTF-8")) event_filter = Filter(json.loads(filter_json)) + if event_filter.filter_json.get("event_format", "client") == "federation": + as_client_event = False else: event_filter = None msgs = yield self.pagination_handler.get_messages( |