diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-30 16:11:14 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-30 16:11:14 +0000 |
commit | 7d897f5bfc4bbb65aa9ab4fb8e601511633baf2c (patch) | |
tree | ccb776c4531d442f5c8c7629528d6e085bb45464 /synapse/federation/transport/client.py | |
parent | Allow any greater version for webclient (diff) | |
parent | Briefly doc structure of query_auth API. (diff) | |
download | synapse-7d897f5bfc4bbb65aa9ab4fb8e601511633baf2c.tar.xz |
Merge pull request #43 from matrix-org/rejections
Rejections
Diffstat (limited to 'synapse/federation/transport/client.py')
-rw-r--r-- | synapse/federation/transport/client.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index e634a3a213..4cb1dea2de 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -213,3 +213,19 @@ class TransportLayerClient(object): ) defer.returnValue(response) + + @defer.inlineCallbacks + @log_function + def send_query_auth(self, destination, room_id, event_id, content): + path = PREFIX + "/query_auth/%s/%s" % (room_id, event_id) + + code, content = yield self.client.post_json( + destination=destination, + path=path, + data=content, + ) + + if not 200 <= code < 300: + raise RuntimeError("Got %d from send_invite", code) + + defer.returnValue(json.loads(content)) |