From: rinpatch Date: Mon, 8 Jul 2019 09:16:32 +0000 (+0300) Subject: OGP/TwitterCard: Add fallbacks in case the attachment key is nonexistent X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=7f609ee8f4608b25428f070e54db2346a69fb239;p=akkoma OGP/TwitterCard: Add fallbacks in case the attachment key is nonexistent --- diff --git a/lib/pleroma/web/metadata/opengraph.ex b/lib/pleroma/web/metadata/opengraph.ex index 357b80a2d..4033ec38f 100644 --- a/lib/pleroma/web/metadata/opengraph.ex +++ b/lib/pleroma/web/metadata/opengraph.ex @@ -121,4 +121,6 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do acc ++ rendered_tags end) end + + defp build_attachments(_), do: [] end diff --git a/lib/pleroma/web/metadata/twitter_card.ex b/lib/pleroma/web/metadata/twitter_card.ex index 040b872e7..9baf5ac97 100644 --- a/lib/pleroma/web/metadata/twitter_card.ex +++ b/lib/pleroma/web/metadata/twitter_card.ex @@ -116,6 +116,7 @@ defmodule Pleroma.Web.Metadata.Providers.TwitterCard do acc ++ rendered_tags end) end + defp build_attachments(_id, _object), do: [] defp player_url(id) do Pleroma.Web.Router.Helpers.o_status_url(Pleroma.Web.Endpoint, :notice_player, id)