summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-25 13:28:31 +0100
committerErik Johnston <erik@matrix.org>2016-08-25 13:42:44 +0100
commit17f4f14df7712426ffe0ddc3dc460820745de8a2 (patch)
tree5ff57a2b03605a28f3f391d57169e6349622de9d /synapse/handlers
parentMerge branch 'release-v0.17.1' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-17f4f14df7712426ffe0ddc3dc460820745de8a2.tar.xz
Pull out event ids rather than full events for state
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/federation.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 01a761715b..92679532b9 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -560,6 +560,18 @@ class FederationHandler(BaseHandler):
         ]))
         states = dict(zip(event_ids, [s[1] for s in states]))
 
+        state_map = yield self.store.get_events(
+            [e_id for ids in states.values() for e_id in ids],
+            get_prev_content=False
+        )
+        states = {
+            key: {
+                k: state_map[e_id]
+                for k, e_id in state_dict.items()
+                if e_id in state_map
+            } for key, state_dict in states.items()
+        }
+
         for e_id, _ in sorted_extremeties_tuple:
             likely_domains = get_domains_from_state(states[e_id])