Merge branch 'oban/fetcher-rejected' into 'develop'
Dialyzer fix for RemoteFetcherWorker See merge request pleroma/pleroma!4183
This commit is contained in:
commit
c45ee5fc82
@ -1 +1 @@
|
|||||||
Discard Remote Fetcher jobs which errored due to an MRF rejection
|
Discard Remote Fetcher jobs which errored due to an MRF rejection.
|
||||||
|
@ -59,6 +59,7 @@ defmodule Pleroma.Object.Fetcher do
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Note: will create a Create activity, which we need internally at the moment.
|
# Note: will create a Create activity, which we need internally at the moment.
|
||||||
|
@spec fetch_object_from_id(String.t(), list()) :: {:ok, Object.t()} | {:error | :reject, any()}
|
||||||
def fetch_object_from_id(id, options \\ []) do
|
def fetch_object_from_id(id, options \\ []) do
|
||||||
with {_, nil} <- {:fetch_object, Object.get_cached_by_ap_id(id)},
|
with {_, nil} <- {:fetch_object, Object.get_cached_by_ap_id(id)},
|
||||||
{_, true} <- {:allowed_depth, Federator.allowed_thread_distance?(options[:depth])},
|
{_, true} <- {:allowed_depth, Federator.allowed_thread_distance?(options[:depth])},
|
||||||
|
@ -13,7 +13,7 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do
|
|||||||
{:ok, _object} ->
|
{:ok, _object} ->
|
||||||
:ok
|
:ok
|
||||||
|
|
||||||
{:rejected, reason} ->
|
{:reject, reason} ->
|
||||||
{:cancel, reason}
|
{:cancel, reason}
|
||||||
|
|
||||||
{:error, :forbidden} ->
|
{:error, :forbidden} ->
|
||||||
@ -27,9 +27,6 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do
|
|||||||
|
|
||||||
{:error, _} = e ->
|
{:error, _} = e ->
|
||||||
e
|
e
|
||||||
|
|
||||||
e ->
|
|
||||||
{:error, e}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user