summary refs log tree commit diff
diff options
context:
space:
mode:
authorHalf-Shot <will@half-shot.uk>2019-12-11 16:55:42 +0000
committerHalf-Shot <will@half-shot.uk>2019-12-18 10:43:04 +0000
commit70765be6061ebb13c0e41e461ec3ba6d23bc153b (patch)
tree2a9b15df2b576d54a1369aa620d76cf2b1ca65a4
parentnewsfile (diff)
downloadsynapse-70765be6061ebb13c0e41e461ec3ba6d23bc153b.tar.xz
linting
-rw-r--r--synapse/handlers/profile.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index c51108e437..f9579d69ee 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -295,12 +295,16 @@ class BaseProfileHandler(BaseHandler):
                 be found to be in any room the server is in, and therefore the query
                 is denied.
         """
+
         # Implementation of MSC1301: don't allow looking up profiles if the
         # requester isn't in the same room as the target. We expect requester to
         # be None when this function is called outside of a profile query, e.g.
         # when building a membership event. In this case, we must allow the
         # lookup.
-        if not self.hs.config.limit_profile_requests_to_users_who_share_rooms or not requester:
+        if (
+            not self.hs.config.limit_profile_requests_to_users_who_share_rooms
+            or not requester
+        ):
             return
 
         # Always allow the user to query their own profile.