Move consent config parsing into ConsentConfig

turns out we need to reuse this, so it's better in the config class.
This commit is contained in:
Richard van der Hoff 2018-05-18 15:41:40 +01:00
parent 9ea219c514
commit d5dca9a04f
4 changed files with 21 additions and 15 deletions

View file

@ -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():