Fix delete activities not federating
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index 783491b67c7950ecd78f07880b22c986572f5c80..96b774c2124bd7476d7f3f1c598484b84bde0163 100644 (file)
@@ -309,12 +309,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
 
   def delete(%Object{data: %{"id" => id, "actor" => actor}} = object, local \\ true) do
     user = User.get_cached_by_ap_id(actor)
+    to = (object.data["to"] || []) ++ (object.data["cc"] || [])
 
     data = %{
       "type" => "Delete",
       "actor" => actor,
       "object" => id,
-      "to" => [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
+      "to" => to
     }
 
     with {:ok, _} <- Object.delete(object),