summary refs log tree commit diff
path: root/synapse/server_notices
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-05-18 15:41:40 +0100
committerRichard van der Hoff <richard@matrix.org>2018-05-22 11:54:51 +0100
commitd5dca9a04fbac7fea0822eaf2fd513b13449184c (patch)
tree8d2f5e5a6f21f6461b64878f3fef6f2e5500e3ce /synapse/server_notices
parentSend users a server notice about consent (diff)
downloadsynapse-d5dca9a04fbac7fea0822eaf2fd513b13449184c.tar.xz
Move consent config parsing into ConsentConfig
turns out we need to reuse this, so it's better in the config class.
Diffstat (limited to 'synapse/server_notices')
-rw-r--r--synapse/server_notices/consent_server_notices.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/synapse/server_notices/consent_server_notices.py b/synapse/server_notices/consent_server_notices.py
index e9098aef27..440f6b1cd4 100644
--- a/synapse/server_notices/consent_server_notices.py
+++ b/synapse/server_notices/consent_server_notices.py
@@ -35,16 +35,10 @@ class ConsentServerNotices(object):
         self._server_notices_manager = hs.get_server_notices_manager()
         self._store = hs.get_datastore()
 
-        self._current_consent_version = None
-        self._server_notice_content = None
         self._users_in_progress = set()
 
-        consent_config = hs.config.consent_config
-        if consent_config is not None:
-            self._current_consent_version = str(consent_config["version"])
-            self._server_notice_content = consent_config.get(
-                "server_notice_content"
-            )
+        self._current_consent_version = hs.config.user_consent_version
+        self._server_notice_content = hs.config.user_consent_server_notice_content
 
         if self._server_notice_content is not None:
             if not self._server_notices_manager.is_enabled():