diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-12-16 15:24:03 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-12-16 15:24:03 +0000 |
commit | 3c7857e49b8dcad723d52174aba77c47453c0298 (patch) | |
tree | 96091f56e7fe5c91540a3390baa0eeb0d1e171c6 /synapse/handlers/federation.py | |
parent | Remove annotate_event_with_state as nothing was using it. Update state tests ... (diff) | |
download | synapse-3c7857e49b8dcad723d52174aba77c47453c0298.tar.xz |
clean up coding style a bit
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 16a104c0e2..d80a54bdea 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -202,7 +202,7 @@ class FederationHandler(BaseHandler): e.msg, affected=event.event_id, ) - + # if we're receiving valid events from an origin, # it's probably a good idea to mark it as not in retry-state # for sending (although this is a bit of a leap) @@ -263,9 +263,7 @@ class FederationHandler(BaseHandler): context = EventContext() yield self.state_handler.annotate_context_with_state(event, context) - events.append( - (event, context) - ) + events.append((event, context)) yield self.store.persist_event( event, @@ -547,8 +545,6 @@ class FederationHandler(BaseHandler): """ event = pdu - context = EventContext() - event.internal_metadata.outlier = True event.signatures.update( @@ -559,6 +555,7 @@ class FederationHandler(BaseHandler): ) ) + context = EventContext() yield self.state_handler.annotate_context_with_state(event, context) yield self.store.persist_event( @@ -685,13 +682,13 @@ class FederationHandler(BaseHandler): @defer.inlineCallbacks def _handle_new_event(self, event, state=None, backfilled=False, current_state=None, fetch_missing=True): - context = EventContext() logger.debug( "_handle_new_event: Before annotate: %s, sigs: %s", event.event_id, event.signatures, ) + context = EventContext() yield self.state_handler.annotate_context_with_state( event, context, |