mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04: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:
parent
6bd1b7053e
commit
7945435587
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user