forked from AkkomaGang/akkoma
Log error when handling unrepeats
This commit is contained in:
parent
271fb5ccb1
commit
c17c55e989
1 changed files with 8 additions and 9 deletions
|
@ -216,17 +216,14 @@ def handle_incoming(
|
||||||
{:ok, activity} <- ActivityPub.delete(object, false) do
|
{:ok, activity} <- ActivityPub.delete(object, false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
else
|
else
|
||||||
e -> :error
|
e ->
|
||||||
|
Logger.error(e)
|
||||||
|
:error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_incoming(
|
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
|
) do
|
||||||
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
|
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
|
||||||
{:ok, object} <-
|
{:ok, object} <-
|
||||||
|
@ -234,7 +231,9 @@ def handle_incoming(
|
||||||
{:ok, activity, _, _} <- ActivityPub.unannounce(actor, object, id, false) do
|
{:ok, activity, _, _} <- ActivityPub.unannounce(actor, object, id, false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
else
|
else
|
||||||
e -> :error
|
e ->
|
||||||
|
Logger.error(e)
|
||||||
|
:error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue