mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 12:24:50 -04:00
Add a type hints for service notices to the HomeServer object. (#9675)
This commit is contained in:
parent
e550ab17ad
commit
7e8dc9934e
11 changed files with 52 additions and 40 deletions
|
@ -650,13 +650,13 @@ class HomeServer(metaclass=abc.ABCMeta):
|
|||
return FederationHandlerRegistry(self)
|
||||
|
||||
@cache_in_self
|
||||
def get_server_notices_manager(self):
|
||||
def get_server_notices_manager(self) -> ServerNoticesManager:
|
||||
if self.config.worker_app:
|
||||
raise Exception("Workers cannot send server notices")
|
||||
return ServerNoticesManager(self)
|
||||
|
||||
@cache_in_self
|
||||
def get_server_notices_sender(self):
|
||||
def get_server_notices_sender(self) -> WorkerServerNoticesSender:
|
||||
if self.config.worker_app:
|
||||
return WorkerServerNoticesSender(self)
|
||||
return ServerNoticesSender(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue