From b2999a705582fe655317a4bc66c25ab637bf1b99 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 14 Dec 2016 13:41:45 +0000 Subject: [PATCH 1/2] Fix /backfill returning events it shouldn't --- synapse/handlers/federation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 771ab3bc4..8f444da87 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -253,8 +253,9 @@ class FederationHandler(BaseHandler): return False event_map = yield self.store.get_events([ - e_id for key_to_eid in event_to_state_ids.values() - for key, e_id in key_to_eid + e_id + for key_to_eid in event_to_state_ids.values() + for key, e_id in key_to_eid.items() if key[0] != EventTypes.Member or check_match(key[1]) ]) From b8255eba2692716ad8456ea96c6d5a8d06a98e80 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 14 Dec 2016 13:49:54 +0000 Subject: [PATCH 2/2] Comment --- synapse/handlers/federation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 8f444da87..1d07e4d02 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -252,6 +252,8 @@ class FederationHandler(BaseHandler): except: return False + # Parses mapping `event_id -> (type, state_key) -> state event_id` + # to get all state ids that we're interested in. event_map = yield self.store.get_events([ e_id for key_to_eid in event_to_state_ids.values()