diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-10-08 07:44:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 07:44:43 -0400 |
commit | eb9ddc8c2e807e691fd1820f88f7c0bf43822661 (patch) | |
tree | 65b74a3ce38b3f79c1b667ef99b66511c7662efc /synapse/handlers/federation.py | |
parent | Fix long-standing bug where `ReadWriteLock` could drop logging contexts (#10993) (diff) | |
download | synapse-eb9ddc8c2e807e691fd1820f88f7c0bf43822661.tar.xz |
Remove the deprecated BaseHandler. (#11005)
The shared ratelimit function was replaced with a dedicated RequestRatelimiter class (accessible from the HomeServer object). Other properties were copied to each sub-class that inherited from BaseHandler.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 043ca4a224..3e341bd287 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -53,7 +53,6 @@ from synapse.events import EventBase from synapse.events.snapshot import EventContext from synapse.events.validator import EventValidator from synapse.federation.federation_client import InvalidResponseError -from synapse.handlers._base import BaseHandler from synapse.http.servlet import assert_params_in_dict from synapse.logging.context import ( make_deferred_yieldable, @@ -78,15 +77,13 @@ if TYPE_CHECKING: logger = logging.getLogger(__name__) -class FederationHandler(BaseHandler): +class FederationHandler: """Handles general incoming federation requests Incoming events are *not* handled here, for which see FederationEventHandler. """ def __init__(self, hs: "HomeServer"): - super().__init__(hs) - self.hs = hs self.store = hs.get_datastore() @@ -99,6 +96,7 @@ class FederationHandler(BaseHandler): self.is_mine_id = hs.is_mine_id self.spam_checker = hs.get_spam_checker() self.event_creation_handler = hs.get_event_creation_handler() + self.event_builder_factory = hs.get_event_builder_factory() self._event_auth_handler = hs.get_event_auth_handler() self._server_notices_mxid = hs.config.servernotices.server_notices_mxid self.config = hs.config |