mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Merge pull request #869 from matrix-org/erikj/backfill_fix
Correctly mark backfilled events as backfilled
This commit is contained in:
commit
d9f7fa2e57
@ -345,19 +345,21 @@ class FederationHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
|
|
||||||
missing_auth = required_auth - set(auth_events)
|
missing_auth = required_auth - set(auth_events)
|
||||||
results = yield defer.gatherResults(
|
if missing_auth:
|
||||||
[
|
logger.info("Missing auth for backfill: %r", missing_auth)
|
||||||
self.replication_layer.get_pdu(
|
results = yield defer.gatherResults(
|
||||||
[dest],
|
[
|
||||||
event_id,
|
self.replication_layer.get_pdu(
|
||||||
outlier=True,
|
[dest],
|
||||||
timeout=10000,
|
event_id,
|
||||||
)
|
outlier=True,
|
||||||
for event_id in missing_auth
|
timeout=10000,
|
||||||
],
|
)
|
||||||
consumeErrors=True
|
for event_id in missing_auth
|
||||||
).addErrback(unwrapFirstError)
|
],
|
||||||
auth_events.update({a.event_id: a for a in results})
|
consumeErrors=True
|
||||||
|
).addErrback(unwrapFirstError)
|
||||||
|
auth_events.update({a.event_id: a for a in results})
|
||||||
|
|
||||||
ev_infos = []
|
ev_infos = []
|
||||||
for a in auth_events.values():
|
for a in auth_events.values():
|
||||||
@ -399,7 +401,7 @@ class FederationHandler(BaseHandler):
|
|||||||
# previous to work out the state.
|
# previous to work out the state.
|
||||||
# TODO: We can probably do something more clever here.
|
# TODO: We can probably do something more clever here.
|
||||||
yield self._handle_new_event(
|
yield self._handle_new_event(
|
||||||
dest, event
|
dest, event, backfilled=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
defer.returnValue(events)
|
defer.returnValue(events)
|
||||||
|
Loading…
Reference in New Issue
Block a user