diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-05-22 08:56:52 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-05-22 12:00:47 +0100 |
commit | a5e2941aad9acdd5033709807bb6ddd40e4435eb (patch) | |
tree | 7cce87b9e5550e8d041030a518060e0f2f212614 /synapse/handlers/room.py | |
parent | Merge pull request #3236 from matrix-org/rav/consent_notice (diff) | |
download | synapse-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.py | 4 |
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) |