summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-08 17:01:57 +0100
committerErik Johnston <erik@matrix.org>2018-08-09 14:58:47 +0100
commitce6db0e5473e31292567b11599eb334c3275c564 (patch)
tree7665b34fae8156b9be52843f0d053bdbef48ef02 /synapse/storage
parentAdd constants for room versions (diff)
downloadsynapse-ce6db0e5473e31292567b11599eb334c3275c564.tar.xz
Choose state algorithm based on room version
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/events.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index ce32e8fefd..dc68d365c2 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -705,9 +705,11 @@ class EventsStore(EventFederationStore, EventsWorkerStore, BackgroundUpdateStore
         }
 
         events_map = {ev.event_id: ev for ev, _ in events_context}
+        room_version = yield self.get_room_version(room_id)
+
         logger.debug("calling resolve_state_groups from preserve_events")
         res = yield self._state_resolution_handler.resolve_state_groups(
-            room_id, state_groups, events_map, get_events
+            room_id, room_version, state_groups, events_map, get_events
         )
 
         defer.returnValue((res.state, None))