Apply suggestion to lib/pleroma/object/fetcher.ex
authorrinpatch <rinpatch@sdf.org>
Sat, 20 Jul 2019 18:53:00 +0000 (18:53 +0000)
committerrinpatch <rinpatch@sdf.org>
Sat, 20 Jul 2019 18:53:00 +0000 (18:53 +0000)
lib/pleroma/object/fetcher.ex

index bc3e7e5bc3df6322c19f5ec35502c3cef56724f1..1e60d00824f3381b4c14da7f652b122b49befcb8 100644 (file)
@@ -97,7 +97,8 @@ defmodule Pleroma.Object.Fetcher do
     end
   end
 
-  def fetch_and_contain_remote_object_from_id(_id) do
+  def fetch_and_contain_remote_object_from_id(%{"id" => id), do: fetch_and_contain_remote_object_from_id(id)
+  def fetch_and_contain_remote_object_from_id(_id), do: {:error, "id must be a string"}
     {:error, "id must be a string"}
   end
 end