diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-10-06 10:47:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-06 10:47:41 -0400 |
commit | f4b1a9a527273ef71b2f7d970642b7af45462e0f (patch) | |
tree | 84e54115c048d408a8f110e62f503b03e4c11ad1 /synapse/storage/databases | |
parent | Add a spamchecker callback to allow or deny room joins (#10910) (diff) | |
download | synapse-f4b1a9a527273ef71b2f7d970642b7af45462e0f.tar.xz |
Require direct references to configuration variables. (#10985)
This removes the magic allowing accessing configurable variables directly from the config object. It is now required that a specific configuration class is used (e.g. `config.foo` must be replaced with `config.server.foo`).
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r-- | synapse/storage/databases/main/push_rule.py | 4 | ||||
-rw-r--r-- | synapse/storage/databases/main/registration.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/push_rule.py b/synapse/storage/databases/main/push_rule.py index a7fb8cd848..b81e33964a 100644 --- a/synapse/storage/databases/main/push_rule.py +++ b/synapse/storage/databases/main/push_rule.py @@ -101,7 +101,9 @@ class PushRulesWorkerStore( prefilled_cache=push_rules_prefill, ) - self._users_new_default_push_rules = hs.config.users_new_default_push_rules + self._users_new_default_push_rules = ( + hs.config.server.users_new_default_push_rules + ) @abc.abstractmethod def get_max_push_rules_stream_id(self): diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py index de262fbf5a..7de4ad7f9b 100644 --- a/synapse/storage/databases/main/registration.py +++ b/synapse/storage/databases/main/registration.py @@ -1778,7 +1778,9 @@ class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore): def __init__(self, database: DatabasePool, db_conn: Connection, hs: "HomeServer"): super().__init__(database, db_conn, hs) - self._ignore_unknown_session_error = hs.config.request_token_inhibit_3pid_errors + self._ignore_unknown_session_error = ( + hs.config.server.request_token_inhibit_3pid_errors + ) self._access_tokens_id_gen = IdGenerator(db_conn, "access_tokens", "id") self._refresh_tokens_id_gen = IdGenerator(db_conn, "refresh_tokens", "id") |