Remove some unused `server_name` fields (#15723)

Signed-off-by: Sean Quah <seanq@matrix.org>
pull/15727/head
Sean Quah 2023-06-06 12:32:29 +01:00 committed by GitHub
parent 1a54953473
commit dfd77f426e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 5 deletions

1
changelog.d/15723.misc Normal file
View File

@ -0,0 +1 @@
Removed some unused fields.

View File

@ -648,7 +648,6 @@ class PresenceHandler(BasePresenceHandler):
def __init__(self, hs: "HomeServer"): def __init__(self, hs: "HomeServer"):
super().__init__(hs) super().__init__(hs)
self.hs = hs self.hs = hs
self.server_name = hs.hostname
self.wheel_timer: WheelTimer[str] = WheelTimer() self.wheel_timer: WheelTimer[str] = WheelTimer()
self.notifier = hs.get_notifier() self.notifier = hs.get_notifier()
self._presence_enabled = hs.config.server.use_presence self._presence_enabled = hs.config.server.use_presence

View File

@ -27,7 +27,6 @@ logger = logging.getLogger(__name__)
class ReadMarkerHandler: class ReadMarkerHandler:
def __init__(self, hs: "HomeServer"): def __init__(self, hs: "HomeServer"):
self.server_name = hs.config.server.server_name
self.store = hs.get_datastores().main self.store = hs.get_datastores().main
self.account_data_handler = hs.get_account_data_handler() self.account_data_handler = hs.get_account_data_handler()
self.read_marker_linearizer = Linearizer(name="read_marker") self.read_marker_linearizer = Linearizer(name="read_marker")

View File

@ -1490,7 +1490,6 @@ class RoomContextHandler:
class TimestampLookupHandler: class TimestampLookupHandler:
def __init__(self, hs: "HomeServer"): def __init__(self, hs: "HomeServer"):
self.server_name = hs.hostname
self.store = hs.get_datastores().main self.store = hs.get_datastores().main
self.state_handler = hs.get_state_handler() self.state_handler = hs.get_state_handler()
self.federation_client = hs.get_federation_client() self.federation_client = hs.get_federation_client()

View File

@ -42,7 +42,6 @@ class StatsHandler:
self.store = hs.get_datastores().main self.store = hs.get_datastores().main
self._storage_controllers = hs.get_storage_controllers() self._storage_controllers = hs.get_storage_controllers()
self.state = hs.get_state_handler() self.state = hs.get_state_handler()
self.server_name = hs.hostname
self.clock = hs.get_clock() self.clock = hs.get_clock()
self.notifier = hs.get_notifier() self.notifier = hs.get_notifier()
self.is_mine_id = hs.is_mine_id self.is_mine_id = hs.is_mine_id

View File

@ -39,7 +39,6 @@ class UploadResource(DirectServeJsonResource):
self.filepaths = media_repo.filepaths self.filepaths = media_repo.filepaths
self.store = hs.get_datastores().main self.store = hs.get_datastores().main
self.clock = hs.get_clock() self.clock = hs.get_clock()
self.server_name = hs.hostname
self.auth = hs.get_auth() self.auth = hs.get_auth()
self.max_upload_size = hs.config.media.max_upload_size self.max_upload_size = hs.config.media.max_upload_size
self.clock = hs.get_clock() self.clock = hs.get_clock()