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:
parent
5f1d707367
commit
ea0ec5fbcf
2 changed files with 9 additions and 22 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue