0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-18 10:38:21 +02:00

Respect min_depth argument

This commit is contained in:
Erik Johnston 2015-03-05 16:31:32 +00:00
parent 6dfd8c73fc
commit 39aa968a76

View file

@ -507,10 +507,12 @@ class FederationClient(FederationBase):
missing_events = {}
for e in itertools.chain(latest_events, signed_events):
missing_events.update({
e_id: e.depth for e_id, _ in e.prev_events
if e_id not in seen_events and e_id not in failed_to_fetch
})
if e.depth > min_depth:
missing_events.update({
e_id: e.depth for e_id, _ in e.prev_events
if e_id not in seen_events
and e_id not in failed_to_fetch
})
if not missing_events:
break