diff options
author | Erik Johnston <erikj@jki.re> | 2017-07-12 10:26:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-12 10:26:29 +0100 |
commit | 28e8c46f2901907b5a3ff0fc28763c85ef75aa40 (patch) | |
tree | 4d6c407c56ca5bfd1b2d63c76e87bbb6bab10d77 /synapse/federation/transport/client.py | |
parent | Merge pull request #2354 from krombel/reduce_static_sync_reply (diff) | |
parent | Comment (diff) | |
download | synapse-28e8c46f2901907b5a3ff0fc28763c85ef75aa40.tar.xz |
Merge pull request #2352 from matrix-org/erikj/group_server_split
Initial Group Server
Diffstat (limited to 'synapse/federation/transport/client.py')
-rw-r--r-- | synapse/federation/transport/client.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index 52b2a717d2..d0f8da7516 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -471,3 +471,49 @@ class TransportLayerClient(object): ) defer.returnValue(content) + + @log_function + def invite_to_group_notification(self, destination, group_id, user_id, content): + """Sent by group server to inform a user's server that they have been + invited. + """ + + path = PREFIX + "/groups/local/%s/users/%s/invite" % (group_id, user_id) + + return self.client.post_json( + destination=destination, + path=path, + data=content, + ignore_backoff=True, + ) + + @log_function + def remove_user_from_group_notification(self, destination, group_id, user_id, + content): + """Sent by group server to inform a user's server that they have been + kicked from the group. + """ + + path = PREFIX + "/groups/local/%s/users/%s/remove" % (group_id, user_id) + + return self.client.post_json( + destination=destination, + path=path, + data=content, + ignore_backoff=True, + ) + + @log_function + def renew_group_attestation(self, destination, group_id, user_id, content): + """Sent by either a group server or a user's server to periodically update + the attestations + """ + + path = PREFIX + "/groups/%s/renew_attestation/%s" % (group_id, user_id) + + return self.client.post_json( + destination=destination, + path=path, + data=content, + ignore_backoff=True, + ) |