mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-30 09:02:28 +00:00
Do not refetch local objects
This commit is contained in:
parent
eb87a86b5b
commit
c096dd86e5
|
@ -48,10 +48,12 @@ defmodule Pleroma.Object.Fetcher do
|
|||
end
|
||||
|
||||
def refetch_object(%Object{data: %{"id" => id}} = object) do
|
||||
with {:ok, data} <- fetch_and_contain_remote_object_from_id(id),
|
||||
with {:local, false} <- {:local, String.starts_with?(id, Pleroma.Web.base_url() <> "/")},
|
||||
{:ok, data} <- fetch_and_contain_remote_object_from_id(id),
|
||||
{:ok, object} <- reinject_object(object, data) do
|
||||
{:ok, object}
|
||||
else
|
||||
{:local, true} -> object
|
||||
e -> {:error, e}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue