logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: c45ee5fc820573f120d7790b342f64f6c77fdf35
parent 89d22ac68ed7416c9f1038bd9d7b30417c485e12
Author: feld <feld@feld.me>
Date:   Wed, 17 Jul 2024 18:03:48 +0000

Merge branch 'oban/fetcher-rejected' into 'develop'

Dialyzer fix for RemoteFetcherWorker

See merge request pleroma/pleroma!4183

Diffstat:

Mchangelog.d/oban-fetcher-rejected.change2+-
Mlib/pleroma/object/fetcher.ex1+
Mlib/pleroma/workers/remote_fetcher_worker.ex5+----
3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/changelog.d/oban-fetcher-rejected.change b/changelog.d/oban-fetcher-rejected.change @@ -1 +1 @@ -Discard Remote Fetcher jobs which errored due to an MRF rejection +Discard Remote Fetcher jobs which errored due to an MRF rejection. diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex @@ -59,6 +59,7 @@ defmodule Pleroma.Object.Fetcher do end # 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 with {_, nil} <- {:fetch_object, Object.get_cached_by_ap_id(id)}, {_, true} <- {:allowed_depth, Federator.allowed_thread_distance?(options[:depth])}, diff --git a/lib/pleroma/workers/remote_fetcher_worker.ex b/lib/pleroma/workers/remote_fetcher_worker.ex @@ -13,7 +13,7 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do {:ok, _object} -> :ok - {:rejected, reason} -> + {:reject, reason} -> {:cancel, reason} {:error, :forbidden} -> @@ -27,9 +27,6 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do {:error, _} = e -> e - - e -> - {:error, e} end end