diff options
author | Erik Johnston <erik@matrix.org> | 2015-06-03 16:30:01 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-06-03 16:41:51 +0100 |
commit | 1c3d844e7314dd5c1722ed77daf4bad8a056217d (patch) | |
tree | 3c71d07bcb0f1dcf23df00ff8428982756f11a46 /synapse/handlers | |
parent | Log where a request came from in federation (diff) | |
download | synapse-1c3d844e7314dd5c1722ed77daf4bad8a056217d.tar.xz |
Don't needlessly compute context
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/federation.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 46ce3699d7..5503d9ae86 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -900,8 +900,10 @@ class FederationHandler(BaseHandler): event.event_id, event.signatures, ) + outlier = event.internal_metadata.is_outlier() + context = yield self.state_handler.compute_event_context( - event, old_state=state + event, old_state=state, outlier=outlier, ) if not auth_events: @@ -912,7 +914,7 @@ class FederationHandler(BaseHandler): event.event_id, auth_events, ) - is_new_state = not event.internal_metadata.is_outlier() + is_new_state = not outlier # This is a hack to fix some old rooms where the initial join event # didn't reference the create event in its auth events. |