diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-20 15:58:44 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-20 15:58:44 +0000 |
commit | 69adf8c384dddfe7c1fdfcd73d28f739bd089e7d (patch) | |
tree | 1362238932c36eb0efd202dd991d315c9df25cbf /synapse | |
parent | Merge pull request #510 from matrix-org/daniel/nonguestpeeking (diff) | |
parent | Whine if we give a from param to /sync (diff) | |
download | synapse-69adf8c384dddfe7c1fdfcd73d28f739bd089e7d.tar.xz |
Merge pull request #512 from matrix-org/erikj/whine_on_from
Whine if we give a from param to /sync
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/v2_alpha/sync.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py index df4b305b49..4114a7e430 100644 --- a/synapse/rest/client/v2_alpha/sync.py +++ b/synapse/rest/client/v2_alpha/sync.py @@ -85,6 +85,13 @@ class SyncRestServlet(RestServlet): @defer.inlineCallbacks def on_GET(self, request): + if "from" in request.args: + # /events used to use 'from', but /sync uses 'since'. + # Lets be helpful and whine if we see a 'from'. + raise SynapseError( + 400, "'from' is not a valid query parameter. Did you mean 'since'?" + ) + requester = yield self.auth.get_user_by_req( request, allow_guest=True ) |