mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-15 22:42:23 +01:00
Explicitly grab individual columns from group object
This commit is contained in:
parent
7945435587
commit
db2fd801f7
1 changed files with 8 additions and 6 deletions
|
@ -404,13 +404,15 @@ class GroupsServerHandler(object):
|
||||||
|
|
||||||
yield self.check_group_is_ours(group_id, requester_user_id)
|
yield self.check_group_is_ours(group_id, requester_user_id)
|
||||||
|
|
||||||
group_description = yield self.store.get_group(group_id)
|
group = yield self.store.get_group(group_id)
|
||||||
|
|
||||||
if group_description:
|
if group:
|
||||||
join_policy = group_description['join_policy']
|
cols = [
|
||||||
del group_description['join_policy']
|
"name", "short_description", "long_description",
|
||||||
|
"avatar_url", "is_public",
|
||||||
group_description['is_openly_joinable'] = join_policy == "open"
|
]
|
||||||
|
group_description = { key: group[key] for key in cols }
|
||||||
|
group_description["is_openly_joinable"] = group['join_policy'] == "open"
|
||||||
|
|
||||||
defer.returnValue(group_description)
|
defer.returnValue(group_description)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue