diff options
Diffstat (limited to 'synapse/config/consent.py')
-rw-r--r-- | synapse/config/consent.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/config/consent.py b/synapse/config/consent.py index ecc43b08b9..8ee3d34521 100644 --- a/synapse/config/consent.py +++ b/synapse/config/consent.py @@ -13,9 +13,10 @@ # limitations under the License. from os import path -from typing import Optional +from typing import Any, Optional from synapse.config import ConfigError +from synapse.types import JsonDict from ._base import Config @@ -76,18 +77,18 @@ class ConsentConfig(Config): section = "consent" - def __init__(self, *args): + def __init__(self, *args: Any): super().__init__(*args) self.user_consent_version: Optional[str] = None self.user_consent_template_dir: Optional[str] = None - self.user_consent_server_notice_content = None + self.user_consent_server_notice_content: Optional[JsonDict] = None self.user_consent_server_notice_to_guests = False - self.block_events_without_consent_error = None + self.block_events_without_consent_error: Optional[str] = None self.user_consent_at_registration = False self.user_consent_policy_name = "Privacy Policy" - def read_config(self, config, **kwargs): + def read_config(self, config: JsonDict, **kwargs: Any) -> None: consent_config = config.get("user_consent") self.terms_template = self.read_template("terms.html") @@ -118,5 +119,5 @@ class ConsentConfig(Config): "policy_name", "Privacy Policy" ) - def generate_config_section(self, **kwargs): + def generate_config_section(self, **kwargs: Any) -> str: return DEFAULT_CONFIG |