summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-31 15:32:24 +0100
committerMark Haines <mark.haines@matrix.org>2016-03-31 15:32:24 +0100
commitdc4c1579d48b7db8264a935be3e955b779c78ab6 (patch)
treecac7bbbc7f4771a50aba666131c78c6dae3e55f0 /synapse/handlers/federation.py
parentMerge pull request #680 from matrix-org/markjh/remove_is_new_state (diff)
downloadsynapse-dc4c1579d48b7db8264a935be3e955b779c78ab6.tar.xz
Remove outlier parameter from compute_event_context
Use event.internal_metadata.is_outlier instead.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r--synapse/handlers/federation.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 4a35344d32..4049c01d26 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -1118,11 +1118,9 @@ class FederationHandler(BaseHandler):
         """
         events_to_context = {}
         for e in itertools.chain(auth_events, state):
-            ctx = yield self.state_handler.compute_event_context(
-                e, outlier=True,
-            )
-            events_to_context[e.event_id] = ctx
             e.internal_metadata.outlier = True
+            ctx = yield self.state_handler.compute_event_context(e)
+            events_to_context[e.event_id] = ctx
 
         event_map = {
             e.event_id: e
@@ -1169,7 +1167,7 @@ class FederationHandler(BaseHandler):
         )
 
         new_event_context = yield self.state_handler.compute_event_context(
-            event, old_state=state, outlier=False,
+            event, old_state=state
         )
 
         event_stream_id, max_stream_id = yield self.store.persist_event(
@@ -1181,10 +1179,9 @@ class FederationHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def _prep_event(self, origin, event, state=None, auth_events=None):
-        outlier = event.internal_metadata.is_outlier()
 
         context = yield self.state_handler.compute_event_context(
-            event, old_state=state, outlier=outlier,
+            event, old_state=state,
         )
 
         if not auth_events: