diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-11-09 08:10:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 08:10:58 -0500 |
commit | a19d01c3d95f5dbd3a4bb181cb70dacd44135a8b (patch) | |
tree | 08ee5565ad14238f5994088fb9aa872b7c8b6e4b /synapse/handlers/room.py | |
parent | Fix typo in `RelationAggregationPaginationServlet` error response (#11278) (diff) | |
download | synapse-a19d01c3d95f5dbd3a4bb181cb70dacd44135a8b.tar.xz |
Support filtering by relations per MSC3440 (#11236)
Adds experimental support for `relation_types` and `relation_senders` fields for filters.
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 969eb3b9b0..7a95e31cbe 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -1158,8 +1158,10 @@ class RoomContextHandler: ) if event_filter: - results["events_before"] = event_filter.filter(results["events_before"]) - results["events_after"] = event_filter.filter(results["events_after"]) + results["events_before"] = await event_filter.filter( + results["events_before"] + ) + results["events_after"] = await event_filter.filter(results["events_after"]) results["events_before"] = await filter_evts(results["events_before"]) results["events_after"] = await filter_evts(results["events_after"]) @@ -1195,7 +1197,7 @@ class RoomContextHandler: state_events = list(state[last_event_id].values()) if event_filter: - state_events = event_filter.filter(state_events) + state_events = await event_filter.filter(state_events) results["state"] = await filter_evts(state_events) |