Remove Fetcher.fetch_object_from_id!/2

It was only being called once and can be replaced with a case statement.
This commit is contained in:
Mark Felder 2023-12-26 14:20:33 -05:00
commit ea0ec5fbcf
2 changed files with 9 additions and 22 deletions

View file

@ -177,7 +177,10 @@ defmodule Pleroma.Object do
ap_id
Keyword.get(options, :fetch) ->
Fetcher.fetch_object_from_id!(ap_id, options)
case Fetcher.fetch_object_from_id(ap_id, options) do
{:ok, object} -> object
_ -> nil
end
true ->
get_cached_by_ap_id(ap_id)