diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-09-08 12:11:36 -0700 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-09-08 12:15:29 -0700 |
commit | 76fe7d4eba334cee8b5c18ac26da709106dff1a2 (patch) | |
tree | 7048fb140aa290d902d82b2911347f71e9078ecf /synapse | |
parent | Handle the case where we don't have a common ancestor (diff) | |
download | synapse-76fe7d4eba334cee8b5c18ac26da709106dff1a2.tar.xz |
Added num_joined_users key to /publicRooms for each room. Show this information in the webclient.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/room.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index a0d0f2af16..310cb46fe7 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -593,6 +593,12 @@ class RoomListHandler(BaseHandler): @defer.inlineCallbacks def get_public_room_list(self): chunk = yield self.store.get_rooms(is_public=True) + for room in chunk: + joined_members = yield self.store.get_room_members( + room_id=room["room_id"], + membership=Membership.JOIN + ) + room["num_joined_members"] = len(joined_members) # FIXME (erikj): START is no longer a valid value defer.returnValue({"start": "START", "end": "END", "chunk": chunk}) |