projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
644bc1e
)
Do not refetch local objects
author
rinpatch
<rinpatch@sdf.org>
Wed, 18 Sep 2019 16:59:23 +0000
(19:59 +0300)
committer
Ariadne Conill
<ariadne@dereferenced.org>
Sun, 6 Oct 2019 14:53:48 +0000
(14:53 +0000)
lib/pleroma/object/fetcher.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/object/fetcher.ex
b/lib/pleroma/object/fetcher.ex
index fecc97c5e5635861aa8ca592c96024d4697bce41..91e6b6dcac888d76b156e34da257ae90ef9caf15 100644
(file)
--- a/
lib/pleroma/object/fetcher.ex
+++ b/
lib/pleroma/object/fetcher.ex
@@
-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