Allow content negotiation for the note permalink

This commit is contained in:
Thomas Sileo 2018-07-20 12:14:11 +02:00
parent 3e7b09b7a8
commit dc8365ff53

3
app.py
View file

@ -842,6 +842,9 @@ def _build_thread(data, include_children=True):
@app.route("/note/<note_id>") @app.route("/note/<note_id>")
def note_by_id(note_id): def note_by_id(note_id):
if is_api_request():
return redirect(url_for('outbox_activity', item_id=note_id))
data = DB.activities.find_one( data = DB.activities.find_one(
{"box": Box.OUTBOX.value, "remote_id": back.activity_url(note_id)} {"box": Box.OUTBOX.value, "remote_id": back.activity_url(note_id)}
) )