Incorporate review
This commit is contained in:
parent
b2f8c21a9b
commit
08a436ecb2
|
@ -0,0 +1 @@
|
||||||
|
Correctly apply the event filter to the `state`, `events_before` and `events_after` fields in the response to `/context` requests.
|
|
@ -1 +0,0 @@
|
||||||
Filter `state`, `events_before` and `events_after` in `/context` requests.
|
|
|
@ -908,12 +908,11 @@ class RoomContextHandler(object):
|
||||||
[last_event_id], state_filter=state_filter
|
[last_event_id], state_filter=state_filter
|
||||||
)
|
)
|
||||||
|
|
||||||
# Apply the filter on state events.
|
|
||||||
state_events = list(state[last_event_id].values())
|
state_events = list(state[last_event_id].values())
|
||||||
if event_filter:
|
if event_filter:
|
||||||
state_events = event_filter.filter(state_events)
|
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
|
# We use a dummy token here as we only care about the room portion of
|
||||||
# the token, which we replace.
|
# the token, which we replace.
|
||||||
|
|
Loading…
Reference in New Issue