Revert "Log error when handling unrepeats"

This reverts commit c17c55e989.
This commit is contained in:
Francis Dinh 2018-05-11 15:34:46 -04:00
parent c17c55e989
commit 4d88747561
1 changed files with 9 additions and 8 deletions

View File

@ -216,14 +216,17 @@ def handle_incoming(
{:ok, activity} <- ActivityPub.delete(object, false) do
{:ok, activity}
else
e ->
Logger.error(e)
:error
e -> :error
end
end
def handle_incoming(
%{"type" => "Undo", "object" => %{"type" => "Announce", "id" => object_id}, "actor" => actor, "id" => id} = data
%{
"type" => "Undo",
"object" => %{"type" => "Announce", "id" => object_id},
"actor" => actor,
"id" => id
} = data
) do
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
{:ok, object} <-
@ -231,9 +234,7 @@ def handle_incoming(
{:ok, activity, _, _} <- ActivityPub.unannounce(actor, object, id, false) do
{:ok, activity}
else
e ->
Logger.error(e)
:error
e -> :error
end
end