diff options
author | lain <lain@soykaf.club> | 2020-05-05 16:42:34 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-05 16:42:34 +0200 |
commit | a3bb2e5474ee068bf375b24df8906e51654c9699 (patch) | |
tree | 2e155d1608ea4ef8059d5a204b45d5f361c9e940 /lib/pleroma/user.ex | |
parent | b34debe61540cf845ccf4ac93066e45a1d9c8f85 (diff) | |
download | pleroma-a3bb2e5474ee068bf375b24df8906e51654c9699.tar.gz |
Undoing: Move undoing announcements to the pipeline everywhere.
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 0136ba119..aa675a521 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -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 |