Fix federation of unreblog activity

This commit is contained in:
Francis Dinh 2018-04-20 23:09:19 -04:00
parent c5dc7e6e31
commit 4b9f2ab526

View file

@ -144,6 +144,7 @@ def unannounce(%User{} = actor, %Object{} = object, local \\ true) do
with %Activity{} = activity <- get_existing_announce(actor.ap_id, object), with %Activity{} = activity <- get_existing_announce(actor.ap_id, object),
unannounce_data <- make_unannounce_data(actor, object), unannounce_data <- make_unannounce_data(actor, object),
{:ok, unannounce_activity} <- insert(unannounce_data, local), {:ok, unannounce_activity} <- insert(unannounce_data, local),
:ok <- maybe_federate(activity),
{:ok, _activity} <- Repo.delete(activity), {:ok, _activity} <- Repo.delete(activity),
{:ok, object} <- remove_announce_from_object(activity, object) do {:ok, object} <- remove_announce_from_object(activity, object) do
{:ok, unannounce_activity, activity, object} {:ok, unannounce_activity, activity, object}