summary refs log tree commit diff
diff options
context:
space:
mode:
authorHalf-Shot <will@half-shot.uk>2019-08-22 14:22:04 +0100
committerHalf-Shot <will@half-shot.uk>2019-08-22 14:22:04 +0100
commit27a686e53b8ba3f2e2f102fae73e598c00ec0086 (patch)
treec14e4293ae623c01768eaa206abf6d4a7abedc37
parentAdd "require_consent" parameter for registration (diff)
downloadsynapse-27a686e53b8ba3f2e2f102fae73e598c00ec0086.tar.xz
Do not send consent notices if "no-consent-required" is set
-rw-r--r--synapse/server_notices/consent_server_notices.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/server_notices/consent_server_notices.py b/synapse/server_notices/consent_server_notices.py
index 415e9c17d8..8e82ee32b2 100644
--- a/synapse/server_notices/consent_server_notices.py
+++ b/synapse/server_notices/consent_server_notices.py
@@ -80,6 +80,10 @@ class ConsentServerNotices(object):
         try:
             u = yield self._store.get_user_by_id(user_id)
 
+            if u["consent_version"] == "no-consent-required":
+                # user is exempt
+                return
+
             if u["is_guest"] and not self._send_to_guests:
                 # don't send to guests
                 return