summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-05-22 08:56:52 +0100
committerRichard van der Hoff <richard@matrix.org>2018-05-22 12:00:47 +0100
commita5e2941aad9acdd5033709807bb6ddd40e4435eb (patch)
tree7cce87b9e5550e8d041030a518060e0f2f212614 /synapse/handlers/room.py
parentMerge pull request #3236 from matrix-org/rav/consent_notice (diff)
downloadsynapse-a5e2941aad9acdd5033709807bb6ddd40e4435eb.tar.xz
Reject attempts to send event before privacy consent is given
Returns an M_CONSENT_NOT_GIVEN error (cf
https://github.com/matrix-org/matrix-doc/issues/1252) if consent is not yet
given.
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 5e9fa95a2d..b5850db42f 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -126,6 +126,10 @@ class RoomCreationHandler(BaseHandler):
             except Exception:
                 raise SynapseError(400, "Invalid user_id: %s" % (i,))
 
+        yield self.event_creation_handler.assert_accepted_privacy_policy(
+            requester,
+        )
+
         invite_3pid_list = config.get("invite_3pid", [])
 
         visibility = config.get("visibility", None)