diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-07-14 13:08:33 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-07-20 18:23:54 +0100 |
commit | 3b5823c74d5bffc68068284145cc78a33476ac84 (patch) | |
tree | cfbeb46ca3e0a6085559e9670658cf9f98bce750 /synapse/rest/client/v2_alpha | |
parent | Merge pull request #204 from illicitonion/develop (diff) | |
download | synapse-3b5823c74d5bffc68068284145cc78a33476ac84.tar.xz |
s/take/claim/ for end to end key APIs
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r-- | synapse/rest/client/v2_alpha/keys.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/rest/client/v2_alpha/keys.py b/synapse/rest/client/v2_alpha/keys.py index f031267751..9a0c842283 100644 --- a/synapse/rest/client/v2_alpha/keys.py +++ b/synapse/rest/client/v2_alpha/keys.py @@ -207,9 +207,9 @@ class KeyQueryServlet(RestServlet): class OneTimeKeyServlet(RestServlet): """ - GET /keys/take/<user-id>/<device-id>/<algorithm> HTTP/1.1 + GET /keys/claim/<user-id>/<device-id>/<algorithm> HTTP/1.1 - POST /keys/take HTTP/1.1 + POST /keys/claim HTTP/1.1 { "one_time_keys": { "<user_id>": { @@ -226,7 +226,7 @@ class OneTimeKeyServlet(RestServlet): """ PATTERN = client_v2_pattern( - "/keys/take(?:/?|(?:/" + "/keys/claim(?:/?|(?:/" "(?P<user_id>[^/]*)/(?P<device_id>[^/]*)/(?P<algorithm>[^/]*)" ")?)" ) @@ -240,7 +240,7 @@ class OneTimeKeyServlet(RestServlet): @defer.inlineCallbacks def on_GET(self, request, user_id, device_id, algorithm): yield self.auth.get_user_by_req(request) - results = yield self.store.take_e2e_one_time_keys( + results = yield self.store.claim_e2e_one_time_keys( [(user_id, device_id, algorithm)] ) defer.returnValue(self.json_result(request, results)) @@ -256,7 +256,7 @@ class OneTimeKeyServlet(RestServlet): for user_id, device_keys in body.get("one_time_keys", {}).items(): for device_id, algorithm in device_keys.items(): query.append((user_id, device_id, algorithm)) - results = yield self.store.take_e2e_one_time_keys(query) + results = yield self.store.claim_e2e_one_time_keys(query) defer.returnValue(self.json_result(request, results)) def json_result(self, request, results): |