Commit 0d1375f2 authored by kaniini's avatar kaniini
Browse files

federator: return :ok or :error depending on if an AP doc was accepted or not

parent 3d9266a8
Pipeline #4545 passed with stages
in 7 minutes and 15 seconds
......@@ -106,15 +106,18 @@ def handle(:incoming_ap_doc, params) do
with {:ok, _user} <- ap_enabled_actor(params["actor"]),
nil <- Activity.normalize(params["id"]),
:ok <- Transmogrifier.contain_origin_from_id(params["actor"], params),
{:ok, _activity} <- Transmogrifier.handle_incoming(params) do
{:ok, activity} <- Transmogrifier.handle_incoming(params) do
{:ok, activity}
%Activity{} ->"Already had #{params["id"]}")
_e ->
# Just drop those for now"Unhandled activity")!(params, pretty: 2))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment