From 73ca8e58344524610a2d512977f5a8cc0cc1b4a6 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 20 Jan 2016 15:42:57 +0000 Subject: [PATCH] Whine if we give a from param to /sync --- synapse/rest/client/v2_alpha/sync.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 )