mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 11:40:44 -05:00
Add joinability for groups
Adds API to set the 'joinable' flag, and corresponding flag in the table.
This commit is contained in:
parent
8efe773ef1
commit
79452edeee
7 changed files with 102 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2014-2016 OpenMarket Ltd
|
||||
# Copyright 2018 New Vector Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
@ -856,6 +857,22 @@ class TransportLayerClient(object):
|
|||
ignore_backoff=True,
|
||||
)
|
||||
|
||||
@log_function
|
||||
def set_group_joinable(self, destination, group_id, requester_user_id,
|
||||
content):
|
||||
"""Sets whether a group is joinable without an invite or knock
|
||||
"""
|
||||
path = PREFIX + "/groups/%s/joinable" % (group_id,)
|
||||
|
||||
return self.client.post_json(
|
||||
destination=destination,
|
||||
path=path,
|
||||
args={"requester_user_id": requester_user_id},
|
||||
data=content,
|
||||
ignore_backoff=True,
|
||||
)
|
||||
|
||||
|
||||
@log_function
|
||||
def delete_group_summary_user(self, destination, group_id, requester_user_id,
|
||||
user_id, role_id):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue