0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 22:03:49 +01:00

When exposing group state, return is_openly_joinable

as opposed to join_policy, which is really only pertinent to the
synapse implementation of the group server.

By doing this we keep the group server concept extensible by
allowing arbitrarily complex rules for deciding whether a group
is openly joinable.
This commit is contained in:
Luke Barnard 2018-04-06 14:06:32 +01:00
parent 6bd1b7053e
commit 7945435587

View file

@ -407,6 +407,11 @@ class GroupsServerHandler(object):
group_description = yield self.store.get_group(group_id)
if group_description:
join_policy = group_description['join_policy']
del group_description['join_policy']
group_description['is_openly_joinable'] = join_policy == "open"
defer.returnValue(group_description)
else:
raise SynapseError(404, "Unknown group")