summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-06-19 16:07:54 +0100
committerErik Johnston <erik@matrix.org>2017-06-19 16:07:54 +0100
commite5ae386ea4112ec91b47de339a3c8a4e034898c0 (patch)
treedfa58ac75e65b503472bc603a9601bc0295a02b7 /synapse
parentRemove unused import (diff)
downloadsynapse-e5ae386ea4112ec91b47de339a3c8a4e034898c0.tar.xz
Handle all cases of sending membership events
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index c0d9c08367..b3f979b246 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -374,6 +374,11 @@ class RoomMemberHandler(BaseHandler):
                     # so don't really fit into the general auth process.
                     raise AuthError(403, "Guest access not allowed")
 
+        if event.membership not in (Membership.LEAVE, Membership.BAN):
+            is_blocked = yield self.store.is_room_blocked(room_id)
+            if is_blocked:
+                raise SynapseError(403, "This room has been blocked on this server")
+
         yield message_handler.handle_new_client_event(
             requester,
             event,