mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 02:02:19 +00:00
Log error when handling unrepeats
This commit is contained in:
parent
271fb5ccb1
commit
c17c55e989
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue