summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-09-03 21:05:06 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-09-03 21:05:06 +0100
commitea128a3e8e08700b047f3e90de559704fd793cda (patch)
tree4b468e4bb85250963576f75dd2c84cb0ea66783f /synapse
parentEnsure the list media admin API is always available (#5966) (diff)
downloadsynapse-ea128a3e8e08700b047f3e90de559704fd793cda.tar.xz
code cleanups
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index f03a2bd540..093f2ea36e 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -962,9 +962,7 @@ class RoomMemberMasterHandler(RoomMemberHandler):
         )
 
         if complexity:
-            if complexity["v1"] > max_complexity:
-                return True
-            return False
+            return complexity["v1"] > max_complexity
         return None
 
     @defer.inlineCallbacks
@@ -980,10 +978,7 @@ class RoomMemberMasterHandler(RoomMemberHandler):
         max_complexity = self.hs.config.limit_remote_rooms.complexity
         complexity = yield self.store.get_room_complexity(room_id)
 
-        if complexity["v1"] > max_complexity:
-            return True
-
-        return False
+        return complexity["v1"] > max_complexity
 
     @defer.inlineCallbacks
     def _remote_join(self, requester, remote_room_hosts, room_id, user, content):