0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-20 12:24:59 +01:00

Correctly handle outliers as prev events over federation

This commit is contained in:
Erik Johnston 2020-07-01 16:59:31 +01:00 committed by Patrick Cloke
parent ea26e9a98b
commit 96e9afe625

View file

@ -238,7 +238,7 @@ class FederationHandler(BaseHandler):
logger.debug("[%s %s] min_depth: %d", room_id, event_id, min_depth) logger.debug("[%s %s] min_depth: %d", room_id, event_id, min_depth)
prevs = set(pdu.prev_event_ids()) prevs = set(pdu.prev_event_ids())
seen = await self.store.have_seen_events(prevs) seen = await self.store.have_events_in_timeline(prevs)
if min_depth is not None and pdu.depth < min_depth: if min_depth is not None and pdu.depth < min_depth:
# This is so that we don't notify the user about this # This is so that we don't notify the user about this
@ -278,7 +278,7 @@ class FederationHandler(BaseHandler):
# Update the set of things we've seen after trying to # Update the set of things we've seen after trying to
# fetch the missing stuff # fetch the missing stuff
seen = await self.store.have_seen_events(prevs) seen = await self.store.have_events_in_timeline(prevs)
if not prevs - seen: if not prevs - seen:
logger.info( logger.info(
@ -423,7 +423,7 @@ class FederationHandler(BaseHandler):
room_id = pdu.room_id room_id = pdu.room_id
event_id = pdu.event_id event_id = pdu.event_id
seen = await self.store.have_seen_events(prevs) seen = await self.store.have_events_in_timeline(prevs)
if not prevs - seen: if not prevs - seen:
return return