summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2021-10-01 01:56:23 -0500
committerEric Eastwood <erice@element.io>2021-10-01 01:56:23 -0500
commit487754f4e16a49f0abf63adbf2f0011a73870e07 (patch)
tree87b74ee30b5a5065bbe2b7dfc9a59062e5ecf3f7
parentRemove debug logs (diff)
downloadsynapse-github/madlittlemods/msc2716-resolve-state-for-all-historical-events.tar.xz
-rw-r--r--synapse/handlers/room.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index de8e6e7c11..873e08258e 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -1167,13 +1167,12 @@ class RoomContextHandler:
         # XXX: why do we return the state as of the last event rather than the
         # first? Shouldn't we be consistent with /sync?
         # https://github.com/matrix-org/matrix-doc/issues/687
-        event_id_to_get_state_from = last_event_id
 
         state = await self.state_store.get_state_for_events(
-            [event_id_to_get_state_from], state_filter=state_filter
+            [last_event_id], state_filter=state_filter
         )
 
-        state_events = list(state[event_id_to_get_state_from].values())
+        state_events = list(state[last_event_id].values())
         if event_filter:
             state_events = event_filter.filter(state_events)