From a26759bb7b626587f0311aba9c9543d1102cb2f1 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Mon, 1 May 2023 14:18:53 -0700 Subject: [PATCH] Add versioned appservice paths to existing routes Synapse v1.81 changed to attempt using version paths when calling an appservice before falling back to the legacy paths. However the appservice was generating a 404 and the server wouldn't fallback so this adds the versioned paths to the existing routes. Resolves #64 --- appservice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appservice.py b/appservice.py index fa548ed..781e0d0 100644 --- a/appservice.py +++ b/appservice.py @@ -29,6 +29,7 @@ def forbidden(error): def shutdown_session(exception=None): db_session.remove() +@app.route("/_matrix/app/v1/rooms/") @app.route("/rooms/") def query_alias(alias): alias_localpart = alias.split(":")[0][1:] @@ -88,6 +89,7 @@ def query_alias(alias): return jsonify({}) +@app.route("/_matrix/app/v1/transactions/", methods=["PUT"]) @app.route("/transactions/", methods=["PUT"]) def on_receive_events(transaction):