diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-16 11:51:46 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-16 11:54:26 +0000 |
commit | 6957bfdca6658114526033e839ceec38b988a323 (patch) | |
tree | ca9d3fab0eca8945466f37d1d26991cff991ba02 /synapse/rest/client | |
parent | Implement no op for room stream in sync (diff) | |
download | synapse-6957bfdca6658114526033e839ceec38b988a323.tar.xz |
Don't recreate so many sets
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/v1/room.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 90242a6bac..0bdd6b5b36 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -748,8 +748,7 @@ class JoinedRoomsRestServlet(ClientV1RestServlet): def on_GET(self, request): requester = yield self.auth.get_user_by_req(request, allow_guest=True) - rooms = yield self.store.get_rooms_for_user(requester.user.to_string()) - room_ids = set(r.room_id for r in rooms) # Ensure they're unique. + room_ids = yield self.store.get_rooms_for_user(requester.user.to_string()) defer.returnValue((200, {"joined_rooms": list(room_ids)})) |