From 40d0a198e20d577b51339f4026d672b1aa968be1 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 14 Jul 2019 12:02:16 +0200 Subject: [PATCH] Object.Fetcher: Handle error on Containment.contain_origin/2 --- lib/pleroma/object/fetcher.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex index 101c21f96..82250ab8d 100644 --- a/lib/pleroma/object/fetcher.ex +++ b/lib/pleroma/object/fetcher.ex @@ -38,6 +38,7 @@ def fetch_object_from_id(id, options \\ []) do "type" => "Create", "to" => data["to"], "cc" => data["cc"], + # TODO: Should we seriously keep this attributedTo thing? "actor" => data["actor"] || data["attributedTo"], "object" => data }, @@ -56,6 +57,9 @@ def fetch_object_from_id(id, options \\ []) do object = %Object{} -> {:ok, object} + :error -> + {:error, "Object containment failed."} + _e -> Logger.info("Couldn't get object via AP, trying out OStatus fetching...")