Only send Tombstone with Delete activity, not the object itself
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -92,7 +92,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
||||
activity_data = %{
|
||||
"type" => "Delete",
|
||||
"actor" => actor_url,
|
||||
"object" => Convertible.model_to_as(target_actor),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => target_actor_url
|
||||
},
|
||||
"id" => target_actor_url <> "/delete",
|
||||
"to" => to,
|
||||
"cc" => cc
|
||||
|
||||
@@ -82,7 +82,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Comments do
|
||||
activity_data = %{
|
||||
"type" => "Delete",
|
||||
"actor" => actor.url,
|
||||
"object" => Convertible.model_to_as(comment),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => url
|
||||
},
|
||||
"id" => url <> "/delete",
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
}
|
||||
|
||||
@@ -115,7 +115,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Discussions do
|
||||
activity_data = %{
|
||||
"type" => "Delete",
|
||||
"actor" => actor.url,
|
||||
"object" => Convertible.model_to_as(discussion),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"url" => url
|
||||
},
|
||||
"id" => url <> "/delete",
|
||||
"to" => [group.members_url]
|
||||
}
|
||||
|
||||
@@ -73,7 +73,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Events do
|
||||
activity_data = %{
|
||||
"type" => "Delete",
|
||||
"actor" => actor.url,
|
||||
"object" => Convertible.model_to_as(event),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => url
|
||||
},
|
||||
"to" => [actor.url <> "/followers", "https://www.w3.org/ns/activitystreams#Public"],
|
||||
"id" => url <> "/delete"
|
||||
}
|
||||
|
||||
@@ -77,7 +77,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Posts do
|
||||
activity_data = %{
|
||||
"actor" => actor_url,
|
||||
"type" => "Delete",
|
||||
"object" => Convertible.model_to_as(post),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => url
|
||||
},
|
||||
"id" => url <> "/delete",
|
||||
"to" => [group_url, @public_ap, members_url]
|
||||
}
|
||||
|
||||
@@ -161,7 +161,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
||||
"actor" => actor_url,
|
||||
"attributedTo" => [group_url],
|
||||
"type" => "Delete",
|
||||
"object" => Convertible.model_to_as(resource),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => url
|
||||
},
|
||||
"id" => url <> "/delete",
|
||||
"to" => [members_url]
|
||||
}
|
||||
|
||||
@@ -55,7 +55,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.TodoLists do
|
||||
activity_data = %{
|
||||
"actor" => actor_url,
|
||||
"type" => "Delete",
|
||||
"object" => Convertible.model_to_as(todo_list),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => url
|
||||
},
|
||||
"id" => url <> "/delete",
|
||||
"to" => [group_url]
|
||||
}
|
||||
|
||||
@@ -95,7 +95,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Todos do
|
||||
activity_data = %{
|
||||
"actor" => actor_url,
|
||||
"type" => "Delete",
|
||||
"object" => Convertible.model_to_as(url),
|
||||
"object" => %{
|
||||
"type" => "Tombstone",
|
||||
"id" => url
|
||||
},
|
||||
"id" => "#{url}/delete",
|
||||
"to" => [group_url]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user