summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-16 11:51:46 +0000
committerErik Johnston <erik@matrix.org>2017-03-16 11:54:26 +0000
commit6957bfdca6658114526033e839ceec38b988a323 (patch)
treeca9d3fab0eca8945466f37d1d26991cff991ba02 /synapse/notifier.py
parentImplement no op for room stream in sync (diff)
downloadsynapse-6957bfdca6658114526033e839ceec38b988a323.tar.xz
Don't recreate so many sets
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 31f723d94d..7eeba6d28e 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -304,8 +304,7 @@ class Notifier(object):
         if user_stream is None:
             current_token = yield self.event_sources.get_current_token()
             if room_ids is None:
-                rooms = yield self.store.get_rooms_for_user(user_id)
-                room_ids = [room.room_id for room in rooms]
+                room_ids = yield self.store.get_rooms_for_user(user_id)
             user_stream = _NotifierUserStream(
                 user_id=user_id,
                 rooms=room_ids,
@@ -454,8 +453,7 @@ class Notifier(object):
 
     @defer.inlineCallbacks
     def _get_room_ids(self, user, explicit_room_id):
-        joined_rooms = yield self.store.get_rooms_for_user(user.to_string())
-        joined_room_ids = map(lambda r: r.room_id, joined_rooms)
+        joined_room_ids = yield self.store.get_rooms_for_user(user.to_string())
         if explicit_room_id:
             if explicit_room_id in joined_room_ids:
                 defer.returnValue(([explicit_room_id], True))