diff options
author | Erik Johnston <erik@matrix.org> | 2017-02-01 10:32:49 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-02-01 10:32:49 +0000 |
commit | acb501c46d75247329f49a1eef3baf6d8af0cba1 (patch) | |
tree | 124153dd4a53a97057e469d468fd763c66ab41d3 /synapse/rest/client/v2_alpha/keys.py | |
parent | Implement /keys/changes (diff) | |
download | synapse-acb501c46d75247329f49a1eef3baf6d8af0cba1.tar.xz |
Comment
Diffstat (limited to 'synapse/rest/client/v2_alpha/keys.py')
-rw-r--r-- | synapse/rest/client/v2_alpha/keys.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/keys.py b/synapse/rest/client/v2_alpha/keys.py index 5080101f18..2e855e5e04 100644 --- a/synapse/rest/client/v2_alpha/keys.py +++ b/synapse/rest/client/v2_alpha/keys.py @@ -152,6 +152,14 @@ class KeyQueryServlet(RestServlet): class KeyChangesServlet(RestServlet): + """Returns the list of changes of keys between two stream tokens (may return + spurious results). + + GET /keys/changes?from=...&to=... + + 200 OK + { "changed": ["@foo:example.com"] } + """ PATTERNS = client_v2_patterns( "/keys/changes$", releases=() @@ -171,7 +179,10 @@ class KeyChangesServlet(RestServlet): requester = yield self.auth.get_user_by_req(request, allow_guest=True) from_token_string = parse_string(request, "from") - parse_string(request, "to") # We want to enforce they do pass us one. + + # We want to enforce they do pass us one, but we ignore it and return + # changes after the "to" as well as before. + parse_string(request, "to") from_token = StreamToken.from_string(from_token_string) |