mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-14 14:40:52 -05:00
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.
This commit is contained in:
parent
49a683d871
commit
eb9ddc8c2e
24 changed files with 166 additions and 215 deletions
|
|
@ -31,18 +31,16 @@ from synapse.appservice import ApplicationService
|
|||
from synapse.storage.databases.main.directory import RoomAliasMapping
|
||||
from synapse.types import JsonDict, Requester, RoomAlias, UserID, get_domain_from_id
|
||||
|
||||
from ._base import BaseHandler
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from synapse.server import HomeServer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DirectoryHandler(BaseHandler):
|
||||
class DirectoryHandler:
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
super().__init__(hs)
|
||||
|
||||
self.auth = hs.get_auth()
|
||||
self.hs = hs
|
||||
self.state = hs.get_state_handler()
|
||||
self.appservice_handler = hs.get_application_service_handler()
|
||||
self.event_creation_handler = hs.get_event_creation_handler()
|
||||
|
|
@ -51,6 +49,7 @@ class DirectoryHandler(BaseHandler):
|
|||
self.enable_room_list_search = hs.config.roomdirectory.enable_room_list_search
|
||||
self.require_membership = hs.config.server.require_membership_for_aliases
|
||||
self.third_party_event_rules = hs.get_third_party_event_rules()
|
||||
self.server_name = hs.hostname
|
||||
|
||||
self.federation = hs.get_federation_client()
|
||||
hs.get_federation_registry().register_query_handler(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue