diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-09-27 15:06:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 15:06:59 +0100 |
commit | e1e3e77bfd4fc6e3e53499156d794e12b065665d (patch) | |
tree | 92ac6786536afd438d854dc2d18adcba5d57628e /synapse/handlers | |
parent | Merge pull request #3965 from matrix-org/rav/notify_app_services_bg_process (diff) | |
parent | more comments (diff) | |
download | synapse-e1e3e77bfd4fc6e3e53499156d794e12b065665d.tar.xz |
Merge pull request #3967 from matrix-org/rav/federation_handler_cleanups
Clarifications in FederationHandler
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/federation.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 128926e719..38bebbf598 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -341,14 +341,22 @@ class FederationHandler(BaseHandler): ) with logcontext.nested_logging_context(p): - state, got_auth_chain = ( + # note that if any of the missing prevs share missing state or + # auth events, the requests to fetch those events are deduped + # by the get_pdu_cache in federation_client. + remote_state, got_auth_chain = ( yield self.federation_client.get_state_for_room( origin, room_id, p, ) ) + + # XXX hrm I'm not convinced that duplicate events will compare + # for equality, so I'm not sure this does what the author + # hoped. auth_chains.update(got_auth_chain) + state_group = { - (x.type, x.state_key): x.event_id for x in state + (x.type, x.state_key): x.event_id for x in remote_state } state_groups.append(state_group) |