Undoing: Move undoing announcements to the pipeline everywhere.
This commit is contained in:
parent
b34debe615
commit
a3bb2e5474
10 changed files with 45 additions and 116 deletions
|
|
@ -1554,7 +1554,7 @@ defmodule Pleroma.User do
|
|||
|> ActivityPub.delete()
|
||||
end
|
||||
|
||||
defp delete_activity(%{data: %{"type" => "Like"}} = activity) do
|
||||
defp delete_activity(%{data: %{"type" => type}} = activity) when type in ["Like", "Announce"] do
|
||||
actor =
|
||||
activity.actor
|
||||
|> get_cached_by_ap_id()
|
||||
|
|
@ -1564,14 +1564,6 @@ defmodule Pleroma.User do
|
|||
Pipeline.common_pipeline(undo, local: true)
|
||||
end
|
||||
|
||||
defp delete_activity(%{data: %{"type" => "Announce"}} = activity) do
|
||||
object = Object.normalize(activity)
|
||||
|
||||
activity.actor
|
||||
|> get_cached_by_ap_id()
|
||||
|> ActivityPub.unannounce(object)
|
||||
end
|
||||
|
||||
defp delete_activity(_activity), do: "Doing nothing"
|
||||
|
||||
def html_filter_policy(%User{no_rich_text: true}) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue