diff options
author | rinpatch <rinpatch@sdf.org> | 2019-01-16 09:42:24 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-01-16 09:42:24 +0300 |
commit | dd1432d6955a72b8483717978d61a505e0608bbc (patch) | |
tree | 0ced67a63e87fb1623783ec13d39745819910c2d /lib/pleroma/web/metadata | |
parent | 565caff3f4f8b21b4bae9fb20732688389b4d829 (diff) | |
download | pleroma-dd1432d6955a72b8483717978d61a505e0608bbc.tar.gz |
Disable previews for any activity, but create
Diffstat (limited to 'lib/pleroma/web/metadata')
-rw-r--r-- | lib/pleroma/web/metadata/opengraph.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/web/metadata/opengraph.ex b/lib/pleroma/web/metadata/opengraph.ex index 33ff075c6..b15856974 100644 --- a/lib/pleroma/web/metadata/opengraph.ex +++ b/lib/pleroma/web/metadata/opengraph.ex @@ -71,7 +71,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do end) end - defp scrub_html_and_truncate(%{data: %{ "object" => %{ "content" => content}}} = activity) do + defp scrub_html_and_truncate(%{data: %{"object" => %{"content" => content}}} = activity) do content # html content comes from DB already encoded, decode first and scrub after |> HtmlEntities.decode() @@ -80,7 +80,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do |> Formatter.truncate() end - defp scrub_html_and_truncate(content) do + defp scrub_html_and_truncate(content) when is_binary(content) do content # html content comes from DB already encoded, decode first and scrub after |> HtmlEntities.decode() @@ -88,6 +88,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do |> HTML.strip_tags() |> Formatter.truncate() end + defp attachment_url(url) do MediaProxy.url(url) end |