logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 0f667761a9349a852c549c0bfb846b793607e397
parent b87ec4997244fc23d803948eccc778a603cf566f
Author: Mark Felder <feld@feld.me>
Date:   Fri,  6 Jun 2025 13:00:54 -0700

The ap_id is a URL, so we can just pass that to set_reachable/1

Also only bother attempting to mark reachable if it was known to be unreachable

Diffstat:

Mlib/pleroma/workers/remote_fetcher_worker.ex10+++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lib/pleroma/workers/remote_fetcher_worker.ex b/lib/pleroma/workers/remote_fetcher_worker.ex @@ -12,13 +12,9 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do def perform(%Job{args: %{"op" => "fetch_remote", "id" => id} = args}) do case Fetcher.fetch_object_from_id(id, depth: args["depth"]) do {:ok, _object} -> - # Mark the server as reachable since we successfully fetched an object - case URI.parse(id) do - %URI{host: host} when not is_nil(host) -> - Instances.set_reachable("https://#{host}") - - _ -> - :ok + unless Instances.reachable?(id) do + # Mark the server as reachable since we successfully fetched an object + Instances.set_reachable(id) end :ok