end
def refetch_object(%Object{data: %{"id" => id}} = object) do
- with {:local, false} <- {:local, String.starts_with?(id, Pleroma.Web.base_url() <> "/")},
+ with {:local, false} <- {:local, Object.local?(object)},
{:ok, data} <- fetch_and_contain_remote_object_from_id(id),
{:ok, object} <- reinject_object(object, data) do
{:ok, object}
else
- {:local, true} -> object
+ {:local, true} -> {:ok, object}
e -> {:error, e}
end
end
end
def fetch_and_contain_remote_object_from_id(id) when is_binary(id) do
- Logger.info("Fetching object #{id} via AP")
+ Logger.debug("Fetching object #{id} via AP")
date = Pleroma.Signature.signed_date()