mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 20:39:22 -05:00
is_joinable -> join_rule
This commit is contained in:
parent
f8d1917fce
commit
ae85c7804e
@ -746,7 +746,7 @@ class GroupsServerHandler(object):
|
|||||||
group_info = yield self.store.get_group(
|
group_info = yield self.store.get_group(
|
||||||
group_id,
|
group_id,
|
||||||
)
|
)
|
||||||
if not group_info['is_joinable']:
|
if group_info['join_policy'] != "open":
|
||||||
raise SynapseError(403, "Group is not publicly joinable")
|
raise SynapseError(403, "Group is not publicly joinable")
|
||||||
|
|
||||||
local_attestation = yield self.add_user(group_id, requester_user_id, content)
|
local_attestation = yield self.add_user(group_id, requester_user_id, content)
|
||||||
|
@ -57,15 +57,12 @@ class GroupServerStore(SQLBaseStore):
|
|||||||
},
|
},
|
||||||
retcols=(
|
retcols=(
|
||||||
"name", "short_description", "long_description",
|
"name", "short_description", "long_description",
|
||||||
"avatar_url", "is_public", "is_joinable",
|
"avatar_url", "is_public", "join_rule",
|
||||||
),
|
),
|
||||||
allow_none=True,
|
allow_none=True,
|
||||||
desc="get_group",
|
desc="get_group",
|
||||||
)
|
)
|
||||||
|
|
||||||
if ret and 'is_joinable' in ret:
|
|
||||||
ret['is_joinable'] = bool(ret['is_joinable'])
|
|
||||||
|
|
||||||
defer.returnValue(ret)
|
defer.returnValue(ret)
|
||||||
|
|
||||||
def get_users_in_group(self, group_id, include_private=False):
|
def get_users_in_group(self, group_id, include_private=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user