summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Konou <konoukaren@gmail.com>2019-03-07 12:26:03 +0100
committerKaren Konou <konoukaren@gmail.com>2019-03-07 12:26:03 +0100
commitc2faae70dfc138efbeb3edccf97c22c2546a665a (patch)
treeb6909f2e23e82f91afc61f5b50580c2f0f1533e2
parent6a69ece437e4c2b503b8ec8cd5de2a4a63519f02 (diff)
downloadpleroma-c2faae70dfc138efbeb3edccf97c22c2546a665a.tar.gz
pleroma-c2faae70dfc138efbeb3edccf97c22c2546a665a.zip
Adjust delete activity audience to match the deleted object
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 98639883e..adb42b9ab 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -309,16 +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"] ||
- [] ++ [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
+ to = object.data["to"] || [] ++ object.data["cc"] || []
data = %{
"type" => "Delete",
"actor" => actor,
"object" => id,
- "to" => Enum.uniq(to)
+ "to" => to
}
with {:ok, _} <- Object.delete(object),