diff options
author | Luke Barnard <lukebarnard1@users.noreply.github.com> | 2018-04-06 16:24:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 16:24:32 +0100 |
commit | 135fc5b9cdbae9544f9ae9612fcbde989e26eb55 (patch) | |
tree | 20240b323f30e1f2dca14629b6ec9753cdc9017f /synapse/federation/transport/client.py | |
parent | Merge pull request #3071 from matrix-org/erikj/resp_size_metrics (diff) | |
parent | de-lint, quote consistency (diff) | |
download | synapse-135fc5b9cdbae9544f9ae9612fcbde989e26eb55.tar.xz |
Merge pull request #3046 from matrix-org/dbkr/join_group
Implement group join API
Diffstat (limited to 'synapse/federation/transport/client.py')
-rw-r--r-- | synapse/federation/transport/client.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index 3beab47832..50a967a7ec 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -615,6 +615,19 @@ class TransportLayerClient(object): ) @log_function + def join_group(self, destination, group_id, user_id, content): + """Attempts to join a group + """ + path = PREFIX + "/groups/%s/users/%s/join" % (group_id, user_id) + + return self.client.post_json( + destination=destination, + path=path, + data=content, + ignore_backoff=True, + ) + + @log_function def invite_to_group(self, destination, group_id, user_id, requester_user_id, content): """Invite a user to a group """ @@ -858,8 +871,8 @@ class TransportLayerClient(object): ) @log_function - def set_group_joinable(self, destination, group_id, requester_user_id, - content): + def set_group_join_policy(self, destination, group_id, requester_user_id, + content): """Sets the join policy for a group """ path = PREFIX + "/groups/%s/settings/m.join_policy" % (group_id,) |