diff options
author | Erik Johnston <erik@matrix.org> | 2017-06-19 16:07:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-06-19 16:07:54 +0100 |
commit | e5ae386ea4112ec91b47de339a3c8a4e034898c0 (patch) | |
tree | dfa58ac75e65b503472bc603a9601bc0295a02b7 /synapse | |
parent | Remove unused import (diff) | |
download | synapse-e5ae386ea4112ec91b47de339a3c8a4e034898c0.tar.xz |
Handle all cases of sending membership events
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/room_member.py | 5 |
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, |