Fetcher: fix local check returning unwrapped object
authorrinpatch <rinpatch@sdf.org>
Wed, 6 Nov 2019 22:40:55 +0000 (01:40 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 6 Nov 2019 22:40:55 +0000 (01:40 +0300)
This resulted in error messages about failed refetches being logged.

lib/pleroma/object/fetcher.ex

index 3bcbd3aea6d2ac1c9c72a5f2893c2e9c3332a225..9a9a4655005d5ab8dcb21511e11ebda5ca7d73a7 100644 (file)
@@ -54,7 +54,7 @@ defmodule Pleroma.Object.Fetcher do
          {:ok, object} <- reinject_object(object, data) do
       {:ok, object}
     else
-      {:local, true} -> object
+      {:local, true} -> {:ok, object}
       e -> {:error, e}
     end
   end