From c8c8813f5d1f1fafdd6ae547eff11a90492547f8 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 4 Sep 2019 09:19:01 +0200 Subject: [PATCH] Make the AP object redirect to the note page --- app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.py b/app.py index f636f01..b88df4e 100644 --- a/app.py +++ b/app.py @@ -527,6 +527,9 @@ def ap_emoji(name): @app.route("/outbox/") def outbox_detail(item_id): + if "text/html" in request.headers.get("Accept", ""): + return redirect(url_for("note_by_id", note_id=item_id)) + doc = DB.activities.find_one( { **in_outbox(), @@ -547,6 +550,9 @@ def outbox_detail(item_id): @app.route("/outbox//activity") def outbox_activity(item_id): + if "text/html" in request.headers.get("Accept", ""): + return redirect(url_for("note_by_id", note_id=item_id)) + data = find_one_activity( {**in_outbox(), **by_remote_id(activity_url(item_id)), **is_public()} )