Treat containment failure as cancel in ReceiverWorker
This commit is contained in:
parent
88e0e6acd5
commit
d487e0160c
@ -12,6 +12,7 @@ defmodule Pleroma.Workers.ReceiverWorker do
|
||||
with {:ok, res} <- Federator.perform(:incoming_ap_doc, params) do
|
||||
{:ok, res}
|
||||
else
|
||||
{:error, :origin_containment_failed} -> {:cancel, :origin_containment_failed}
|
||||
{:error, {:reject, reason}} -> {:cancel, reason}
|
||||
e -> e
|
||||
end
|
||||
|
@ -153,7 +153,7 @@ defmodule Pleroma.Web.FederatorTest do
|
||||
}
|
||||
|
||||
assert {:ok, job} = Federator.incoming_ap_doc(params)
|
||||
assert {:error, :origin_containment_failed} = ObanHelpers.perform(job)
|
||||
assert {:cancel, :origin_containment_failed} = ObanHelpers.perform(job)
|
||||
end
|
||||
|
||||
test "it does not crash if MRF rejects the post" do
|
||||
|
Loading…
Reference in New Issue
Block a user