summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/5902.feature1
-rw-r--r--synapse/handlers/message.py5
-rw-r--r--synapse/storage/registration.py1
-rw-r--r--tests/storage/test_registration.py1
4 files changed, 7 insertions, 1 deletions
diff --git a/changelog.d/5902.feature b/changelog.d/5902.feature
new file mode 100644
index 0000000000..c1c5c97b18
--- /dev/null
+++ b/changelog.d/5902.feature
@@ -0,0 +1 @@
+Support users are no longer required to consent.
\ No newline at end of file
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index a5e23c4caf..97a89fe882 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -24,7 +24,7 @@ from twisted.internet import defer
 from twisted.internet.defer import succeed
 
 from synapse import event_auth
-from synapse.api.constants import EventTypes, Membership, RelationTypes
+from synapse.api.constants import EventTypes, Membership, RelationTypes, UserTypes
 from synapse.api.errors import (
     AuthError,
     Codes,
@@ -469,6 +469,9 @@ class EventCreationHandler(object):
 
         u = yield self.store.get_user_by_id(user_id)
         assert u is not None
+        if u["user_type"] == UserTypes.SUPPORT:
+            # support users are not required to consent
+            return
         if u["appservice_id"] is not None:
             # users registered by an appservice are exempt
             return
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 55e4e84d71..938fd00717 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -56,6 +56,7 @@ class RegistrationWorkerStore(SQLBaseStore):
                 "consent_server_notice_sent",
                 "appservice_id",
                 "creation_ts",
+                "user_type",
             ],
             allow_none=True,
             desc="get_user_by_id",
diff --git a/tests/storage/test_registration.py b/tests/storage/test_registration.py
index 0253c4ac05..4578cc3b60 100644
--- a/tests/storage/test_registration.py
+++ b/tests/storage/test_registration.py
@@ -49,6 +49,7 @@ class RegistrationStoreTestCase(unittest.TestCase):
                 "consent_server_notice_sent": None,
                 "appservice_id": None,
                 "creation_ts": 1000,
+                "user_type": None,
             },
             (yield self.store.get_user_by_id(self.user_id)),
         )