Commit c096dd86 authored by rinpatch's avatar rinpatch

Do not refetch local objects

parent eb87a86b
......@@ -48,10 +48,12 @@ defp reinject_object(struct, data) 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment