summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorLuke Barnard <luke@matrix.org>2017-11-16 17:57:34 +0000
committerLuke Barnard <luke@matrix.org>2017-11-16 17:57:34 +0000
commit9d83d52027e42728040bdba94dfb2ea9fa418680 (patch)
tree0a970e53387215d862eb94cc5aafe243f3290a55 /synapse
parentMake sure we check AS groups for lookup on bulk (diff)
downloadsynapse-9d83d52027e42728040bdba94dfb2ea9fa418680.tar.xz
Use a generator instead of a list
Diffstat (limited to 'synapse')
-rw-r--r--synapse/appservice/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py
index 5be5120c91..fbb4e44206 100644
--- a/synapse/appservice/__init__.py
+++ b/synapse/appservice/__init__.py
@@ -275,11 +275,11 @@ class ApplicationService(object):
     def get_groups_for_user(self, user_id):
         """Get the groups that this user is associated with by this AS
         """
-        return [
+        return (
             regex_obj["group_id"]
             for regex_obj in self.namespaces[ApplicationService.NS_USERS]
             if "group_id" in regex_obj and regex_obj["regex"].match(user_id)
-        ]
+        )
 
     def is_rate_limited(self):
         return self.rate_limited