commit: 27fcc421719062d5de9bf4dc90f3349595eb278d
parent 1c394dd18c5d61dc716a9b9cda981a359de32456
Author: feld <feld@feld.me>
Date: Sat, 24 Aug 2024 16:53:22 +0000
Use Pleroma.Object.Containment.get_actor/1 to reliably find the actor of an incoming activity or object
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
@@ -567,9 +567,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
defp unknown_delete?(%{
"type" => "Delete",
- "actor" => actor
- }) do
- case User.get_cached_by_ap_id(actor) do
+ } = data) do
+ case data |> Pleroma.Object.Containment.get_actor() |> User.get_cached_by_ap_id() do
%User{} -> false
_ -> true
end