Split FederationHandler in half (#10692)

The idea here is to take anything to do with incoming events and move it out to a separate handler, as a way of making FederationHandler smaller.
This commit is contained in:
Richard van der Hoff 2021-08-26 21:41:44 +01:00 committed by GitHub
parent 96715d7633
commit 1800aabfc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1883 additions and 1780 deletions

View file

@ -76,6 +76,7 @@ from synapse.handlers.e2e_room_keys import E2eRoomKeysHandler
from synapse.handlers.event_auth import EventAuthHandler
from synapse.handlers.events import EventHandler, EventStreamHandler
from synapse.handlers.federation import FederationHandler
from synapse.handlers.federation_event import FederationEventHandler
from synapse.handlers.groups_local import GroupsLocalHandler, GroupsLocalWorkerHandler
from synapse.handlers.identity import IdentityHandler
from synapse.handlers.initial_sync import InitialSyncHandler
@ -546,6 +547,10 @@ class HomeServer(metaclass=abc.ABCMeta):
def get_federation_handler(self) -> FederationHandler:
return FederationHandler(self)
@cache_in_self
def get_federation_event_handler(self) -> FederationEventHandler:
return FederationEventHandler(self)
@cache_in_self
def get_identity_handler(self) -> IdentityHandler:
return IdentityHandler(self)