diff --git a/app.py b/app.py index 8469d22..ff9c410 100644 --- a/app.py +++ b/app.py @@ -1303,11 +1303,20 @@ def admin(): @login_required def admin_lookup(): data = None + meta = None if request.method == "POST": if request.form.get("url"): data = lookup(request.form.get("url")) + if data.has_type(ActivityType.ANNOUNCE): + meta = dict( + object=data.get_object().to_dict(), + object_actor=data.get_object().get_actor().to_dict(), + actor=data.get_actor().to_dict(), + ) - return render_template("lookup.html", data=data, url=request.form.get("url")) + return render_template( + "lookup.html", data=data, meta=meta, url=request.form.get("url") + ) @app.route("/admin/thread") diff --git a/templates/lookup.html b/templates/lookup.html index 35af1b8..a8fb5f7 100644 --- a/templates/lookup.html +++ b/templates/lookup.html @@ -31,6 +31,13 @@ {{ utils.display_note(data.object, ui=True) }} {% elif data | has_type('Note') %} {{ utils.display_note(data, ui=True) }} + {% elif data | has_type('Announce') %} + {% set boost_actor = meta.actor %} +

+ {{ boost_actor.name }} boosted +

+ {{ utils.display_note(meta.object, ui=False, meta={'actor': meta.object_actor}) }} + {% endif %} {% endif %}