forked from AkkomaGang/akkoma
Revert "Log error when handling unrepeats"
This reverts commit c17c55e989
.
This commit is contained in:
parent
c17c55e989
commit
4d88747561
1 changed files with 9 additions and 8 deletions
|
@ -216,24 +216,25 @@ def handle_incoming(
|
||||||
{:ok, activity} <- ActivityPub.delete(object, false) do
|
{:ok, activity} <- ActivityPub.delete(object, false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
else
|
else
|
||||||
e ->
|
e -> :error
|
||||||
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
|
%{
|
||||||
) 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),
|
with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
|
||||||
{:ok, object} <-
|
{:ok, object} <-
|
||||||
get_obj_helper(object_id) || ActivityPub.fetch_object_from_id(object_id),
|
get_obj_helper(object_id) || ActivityPub.fetch_object_from_id(object_id),
|
||||||
{: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 ->
|
e -> :error
|
||||||
Logger.error(e)
|
|
||||||
:error
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue