mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 01:44:02 +01:00
Merge pull request #512 from matrix-org/erikj/whine_on_from
Whine if we give a from param to /sync
This commit is contained in:
commit
69adf8c384
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,13 @@ class SyncRestServlet(RestServlet):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def on_GET(self, request):
|
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(
|
requester = yield self.auth.get_user_by_req(
|
||||||
request, allow_guest=True
|
request, allow_guest=True
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue