summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2017-10-03 15:16:40 +0100
committerDavid Baker <dave@matrix.org>2017-10-03 15:16:40 +0100
commitbd769a81e12ea710accdebbaa296db1c1a625f75 (patch)
tree230230cd8e1ad34f2a0dfee9bbe8cf0dab37ebdc /synapse
parentActually write warpper function (diff)
downloadsynapse-bd769a81e12ea710accdebbaa296db1c1a625f75.tar.xz
better logging
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index e88ba0e3a6..76e46d93fe 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -217,10 +217,15 @@ class RoomMemberHandler(BaseHandler):
                 requester.user,
             )
             if not is_requester_admin:
-                if (
-                    self.hs.config.block_non_admin_invites or
-                    not self.spam_checker.user_may_invite(requester.user)
-                ):
+                if self.hs.config.block_non_admin_invites:
+                    logger.debug(
+                        "Blocking invite: user is not admin and non-admin "
+                        "invites disabled"
+                    )
+                    block_invite = True
+
+                if not self.spam_checker.user_may_invite(requester.user):
+                    logger.debug("Blocking invite due to spam checker")
                     block_invite = True
 
             if block_invite: