diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-04-21 00:46:54 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-04-21 01:31:09 +0100 |
commit | 4903ccf159552319a36708069c8eb52ce53542dd (patch) | |
tree | 3f1482b18195c396dd1ab419f5d65ad43e28493c /synapse/federation/transport | |
parent | m.read_marker -> m.fully_read (#2128) (diff) | |
download | synapse-4903ccf159552319a36708069c8eb52ce53542dd.tar.xz |
Fix some lies, and other clarifications, in docstrings
The documentation on get_json has been wrong ever since the very first commit to synapse...
Diffstat (limited to 'synapse/federation/transport')
-rw-r--r-- | synapse/federation/transport/client.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index 15a03378f5..8887c624da 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -193,6 +193,26 @@ class TransportLayerClient(object): @defer.inlineCallbacks @log_function def make_membership_event(self, destination, room_id, user_id, membership): + """Asks a remote server to build and sign us a membership event + + Note that this does not append any events to any graphs. + + Args: + destination (str): address of remote homeserver + room_id (str): room to join/leave + user_id (str): user to be joined/left + membership (str): one of join/leave + + Returns: + Deferred: Succeeds when we get a 2xx HTTP response. The result + will be the decoded JSON body (ie, the new event). + + Fails with ``HTTPRequestException`` if we get an HTTP response + code >= 300. + + Fails with ``NotRetryingDestination`` if we are not yet ready + to retry this server. + """ valid_memberships = {Membership.JOIN, Membership.LEAVE} if membership not in valid_memberships: raise RuntimeError( |