diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-12-04 14:18:46 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-12-04 14:18:46 +0000 |
commit | 08a436ecb25de2c4c8f2daf423bfcaf72e985143 (patch) | |
tree | 1e6166e9cccdb49acd5856657e923775a178f591 | |
parent | Format changelog (diff) | |
download | synapse-08a436ecb25de2c4c8f2daf423bfcaf72e985143.tar.xz |
Incorporate review
Diffstat (limited to '')
-rw-r--r-- | changelog.d/6329.bugfix | 1 | ||||
-rw-r--r-- | changelog.d/6329.feature | 1 | ||||
-rw-r--r-- | synapse/handlers/room.py | 3 |
3 files changed, 2 insertions, 3 deletions
diff --git a/changelog.d/6329.bugfix b/changelog.d/6329.bugfix new file mode 100644 index 0000000000..e558d13b7d --- /dev/null +++ b/changelog.d/6329.bugfix @@ -0,0 +1 @@ +Correctly apply the event filter to the `state`, `events_before` and `events_after` fields in the response to `/context` requests. \ No newline at end of file diff --git a/changelog.d/6329.feature b/changelog.d/6329.feature deleted file mode 100644 index c27dbb06a4..0000000000 --- a/changelog.d/6329.feature +++ /dev/null @@ -1 +0,0 @@ -Filter `state`, `events_before` and `events_after` in `/context` requests. diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 3148df0de9..fd3ea8daf8 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -908,12 +908,11 @@ class RoomContextHandler(object): [last_event_id], state_filter=state_filter ) - # Apply the filter on state events. state_events = list(state[last_event_id].values()) if event_filter: state_events = event_filter.filter(state_events) - results["state"] = list(state_events) + results["state"] = state_events # We use a dummy token here as we only care about the room portion of # the token, which we replace. |