diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-10-13 15:17:13 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-10-13 21:38:48 +0100 |
commit | d59378d86b04b396ff493b45bd2b9b68513038e0 (patch) | |
tree | c79c48694a41a248085feff010e149a06b0a59f0 /synapse/handlers/federation.py | |
parent | Move additional tasks to the background worker, part 4 (#8513) (diff) | |
download | synapse-d59378d86b04b396ff493b45bd2b9b68513038e0.tar.xz |
Remove redundant calls to third_party_rules in `on_send_{join,leave}`
There's not much point in calling these *after* we have decided to accept them into the DAG.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 455acd7669..c38cb7a5c8 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1567,15 +1567,6 @@ class FederationHandler(BaseHandler): context = await self._handle_new_event(origin, event) - event_allowed = await self.third_party_event_rules.check_event_allowed( - event, context - ) - if not event_allowed: - logger.info("Sending of join %s forbidden by third-party rules", event) - raise SynapseError( - 403, "This event is not allowed in this context", Codes.FORBIDDEN - ) - logger.debug( "on_send_join_request: After _handle_new_event: %s, sigs: %s", event.event_id, @@ -1789,16 +1780,7 @@ class FederationHandler(BaseHandler): event.internal_metadata.outlier = False - context = await self._handle_new_event(origin, event) - - event_allowed = await self.third_party_event_rules.check_event_allowed( - event, context - ) - if not event_allowed: - logger.info("Sending of leave %s forbidden by third-party rules", event) - raise SynapseError( - 403, "This event is not allowed in this context", Codes.FORBIDDEN - ) + await self._handle_new_event(origin, event) logger.debug( "on_send_leave_request: After _handle_new_event: %s, sigs: %s", |