From: Francis Dinh Date: Fri, 11 May 2018 19:29:19 +0000 (-0400) Subject: Log error when handling unrepeats X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c17c55e989a47f0722b115ffba48b7a1b45b7628;p=akkoma Log error when handling unrepeats --- diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 586fe2eb2..0c4a62762 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -216,25 +216,24 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do {:ok, activity} <- ActivityPub.delete(object, false) do {:ok, activity} else - e -> :error + e -> + Logger.error(e) + :error end end def handle_incoming( - %{ - "type" => "Undo", - "object" => %{"type" => "Announce", "id" => object_id}, - "actor" => actor, - "id" => id - } = data - ) do + %{"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} <- get_obj_helper(object_id) || ActivityPub.fetch_object_from_id(object_id), {:ok, activity, _, _} <- ActivityPub.unannounce(actor, object, id, false) do {:ok, activity} else - e -> :error + e -> + Logger.error(e) + :error end end