def unannounce(
%User{} = actor,
%Object{} = object,
- local \\ true,
- activity_id \\ nil
+ activity_id \\ nil,
+ local \\ true
) do
with %Activity{} = announce_activity <- get_existing_announce(actor.ap_id, object),
unannounce_data <- make_unannounce_data(actor, announce_activity, activity_id),
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
{:ok, object} <-
get_obj_helper(object_id) || ActivityPub.fetch_object_from_id(object_id),
- {:ok, activity} <- ActivityPub.unannounce(object, false) do
+ {:ok, activity} <- ActivityPub.unannounce(actor, object, id, false) do
{:ok, activity}
else
e -> :error