rich media: kill some testsuite noise
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 28 Jan 2019 20:55:33 +0000 (20:55 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 28 Jan 2019 20:55:33 +0000 (20:55 +0000)
lib/pleroma/html.ex
lib/pleroma/web/rich_media/helpers.ex

index fb602d6b6186335f1b4174f59fd6e70de9036648..bf5daa9482bdb1da279502b5a8c5b937f805d5fc 100644 (file)
@@ -69,7 +69,7 @@ defmodule Pleroma.HTML do
         |> Floki.attribute("a", "href")
         |> Enum.at(0)
 
-      {:commit, result}
+      {:commit, {:ok, result}}
     end)
   end
 end
index 91c27f9e09c8302f85215c431fd8271b5aa57d82..71fdddef9674a3ebb40fa32a52d9e084e036d374 100644 (file)
@@ -8,7 +8,7 @@ defmodule Pleroma.Web.RichMedia.Helpers do
 
   def fetch_data_for_activity(%Activity{} = activity) do
     with %Object{} = object <- Object.normalize(activity.data["object"]),
-         page_url <- HTML.extract_first_external_url(object, object.data["content"]),
+         {:ok, page_url} <- HTML.extract_first_external_url(object, object.data["content"]),
          {:ok, rich_media} <- Parser.parse(page_url) do
       %{page_url: page_url, rich_media: rich_media}
     else