From c17c55e989a47f0722b115ffba48b7a1b45b7628 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Fri, 11 May 2018 15:29:19 -0400 Subject: [PATCH] Log error when handling unrepeats --- lib/pleroma/web/activity_pub/transmogrifier.ex | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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 -- 2.45.2