diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2023-05-05 15:06:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 15:06:22 +0100 |
commit | e46d5f3586025a491d11a31ce2be4c540c38d404 (patch) | |
tree | 1a0d9a7b99cf0d7a0e19143c588f4b077f559fad /synapse/federation/federation_base.py | |
parent | Allow running Complement integration tests via podman (#15543) (diff) | |
download | synapse-e46d5f3586025a491d11a31ce2be4c540c38d404.tar.xz |
Factor out an `is_mine_server_name` method (#15542)
Add an `is_mine_server_name` method, similar to `is_mine_id`. Ideally we would use this consistently, instead of sometimes comparing against `hs.hostname` and other times reaching into `hs.config.server.server_name`. Also fix a bug in the tests where `hs.hostname` would sometimes differ from `hs.config.server.server_name`. Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/federation/federation_base.py')
-rw-r--r-- | synapse/federation/federation_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py index 3df975958d..b77022b406 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py @@ -49,7 +49,7 @@ class FederationBase: def __init__(self, hs: "HomeServer"): self.hs = hs - self.server_name = hs.hostname + self._is_mine_server_name = hs.is_mine_server_name self.keyring = hs.get_keyring() self._spam_checker_module_callbacks = hs.get_module_api_callbacks().spam_checker self.store = hs.get_datastores().main |