summary refs log tree commit diff
path: root/synapse/groups
diff options
context:
space:
mode:
authorLuke Barnard <lukeb@openmarket.com>2017-11-02 16:41:07 +0000
committerLuke Barnard <lukeb@openmarket.com>2017-11-02 16:42:30 +0000
commita34c586a89e06b0c68d58ab2f29a2dd5281df893 (patch)
treea20b731423b3bc01e7ddaa28517b08cc3ea35441 /synapse/groups
parentMerge pull request #2628 from matrix-org/rav/module_api_hooks (diff)
downloadsynapse-a34c586a89e06b0c68d58ab2f29a2dd5281df893.tar.xz
Make the get_rooms_in_group API more sane
Return entries with is_public = True when they're public and is_public = False otherwise.
Diffstat (limited to 'synapse/groups')
-rw-r--r--synapse/groups/groups_server.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index e21ac8e49e..addc70ce94 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -507,7 +507,6 @@ class GroupsServerHandler(object):
         chunk = []
         for room_result in room_results:
             room_id = room_result["room_id"]
-            is_public = room_result["is_public"]
 
             joined_users = yield self.store.get_users_in_room(room_id)
             entry = yield self.room_list_handler.generate_room_entry(
@@ -518,8 +517,7 @@ class GroupsServerHandler(object):
             if not entry:
                 continue
 
-            if not is_public:
-                entry["is_public"] = False
+            entry["is_public"] = bool(room_result["is_public"])
 
             chunk.append(entry)