mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-17 09:33:54 +01:00
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>
This commit is contained in:
parent
57b3751918
commit
8824325b82
1 changed files with 2 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue