From: Egor Kislitsyn Date: Mon, 15 Jun 2020 12:03:40 +0000 (+0400) Subject: Merge remote-tracking branch 'origin/develop' into merge-ogp-twitter-parsers X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=58e4e3db8b04933129303d0ad9da74b43cbb4003;p=akkoma Merge remote-tracking branch 'origin/develop' into merge-ogp-twitter-parsers --- 58e4e3db8b04933129303d0ad9da74b43cbb4003 diff --cc lib/pleroma/web/rich_media/parsers/oembed_parser.ex index 5d87a90e9,db8ccf15d..6bdeac89c --- a/lib/pleroma/web/rich_media/parsers/oembed_parser.ex +++ b/lib/pleroma/web/rich_media/parsers/oembed_parser.ex @@@ -5,11 -5,11 +5,11 @@@ defmodule Pleroma.Web.RichMedia.Parsers.OEmbed do def parse(html, _data) do with elements = [_ | _] <- get_discovery_data(html), - {:ok, oembed_url} <- get_oembed_url(elements), + oembed_url when is_binary(oembed_url) <- get_oembed_url(elements), {:ok, oembed_data} <- get_oembed_data(oembed_url) do - {:ok, oembed_data} + oembed_data else - _e -> {:error, "No OEmbed data found"} + _e -> %{} end end