summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorLuke Barnard <luke@matrix.org>2018-04-06 15:51:15 +0100
committerLuke Barnard <luke@matrix.org>2018-04-06 15:57:25 +0100
commitdb2fd801f722ae8341b36314fb8929a80fd53996 (patch)
treeccfbc571ef616d2c1961b22d7487ac972dbab766 /synapse
parentWhen exposing group state, return is_openly_joinable (diff)
downloadsynapse-db2fd801f722ae8341b36314fb8929a80fd53996.tar.xz
Explicitly grab individual columns from group object
Diffstat (limited to 'synapse')
-rw-r--r--synapse/groups/groups_server.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index 290eec7127..ad937c1721 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -404,13 +404,15 @@ class GroupsServerHandler(object):
 
         yield self.check_group_is_ours(group_id, requester_user_id)
 
-        group_description = yield self.store.get_group(group_id)
-
-        if group_description:
-            join_policy = group_description['join_policy']
-            del group_description['join_policy']
+        group = yield self.store.get_group(group_id)
 
-            group_description['is_openly_joinable'] = join_policy == "open"
+        if group:
+            cols = [
+                "name", "short_description", "long_description",
+                "avatar_url", "is_public",
+            ]
+            group_description = { key: group[key] for key in cols }
+            group_description["is_openly_joinable"] = group['join_policy'] == "open"
 
             defer.returnValue(group_description)
         else: