summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-06 15:25:03 +0000
committerErik Johnston <erik@matrix.org>2014-11-06 15:25:03 +0000
commit233969bb586f2a5b0231c8e0675c8c8c3097ef03 (patch)
treecf2eccda6e73c651297b96dfea0ccee474aad02c
parentDon't send prev_state to clients anymore (diff)
downloadsynapse-233969bb586f2a5b0231c8e0675c8c8c3097ef03.tar.xz
Update to use replaces_state rather than prev_state
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 513ec9a5e3..f0448a05d8 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -386,8 +386,10 @@ class FederationHandler(BaseHandler):
             event = yield self.store.get_event(event_id)
             if hasattr(event, "state_key"):
                 # Get previous state
-                if hasattr(event, "prev_state") and event.prev_state:
-                    prev_event = yield self.store.get_event(event.prev_state)
+                if hasattr(event, "replaces_state") and event.replaces_state:
+                    prev_event = yield self.store.get_event(
+                        event.replaces_state
+                    )
                     results[(event.type, event.state_key)] = prev_event
                 else:
                     del results[(event.type, event.state_key)]