From: Francis Dinh Date: Sun, 22 Apr 2018 05:55:41 +0000 (-0400) Subject: Rename make_unannounce_data helper to make_undo_data X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c649ca89586ec83407b298c20f51a25318d777b9;p=akkoma Rename make_unannounce_data helper to make_undo_data This makes it a bit more easier to adapt for unlikes as well in the future. --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index ace230804..0eb5829ef 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -142,7 +142,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do def unannounce(%User{} = actor, %Object{} = object, local \\ true) do with %Activity{} = activity <- get_existing_announce(actor.ap_id, object), - unannounce_data <- make_unannounce_data(actor, activity), + unannounce_data <- make_undo_data(actor, activity), {:ok, unannounce_activity} <- insert(unannounce_data, local), :ok <- maybe_federate(activity), {:ok, _activity} <- Repo.delete(activity), diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 9e2fa1fb2..d2a421ea4 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -279,9 +279,9 @@ defmodule Pleroma.Web.ActivityPub.Utils do end @doc """ - Make unannounce activity data for the given actor and object + Make undo activity data for the given actor and object """ - def make_unannounce_data( + def make_undo_data( %User{ap_id: ap_id} = user, %Activity{data: %{"id" => id, "context" => context}} = activity ) do