OGP/TwitterCard: Add fallbacks in case the attachment key is nonexistent
authorrinpatch <rinpatch@sdf.org>
Mon, 8 Jul 2019 09:16:32 +0000 (12:16 +0300)
committerrinpatch <rinpatch@sdf.org>
Mon, 8 Jul 2019 09:16:32 +0000 (12:16 +0300)
lib/pleroma/web/metadata/opengraph.ex
lib/pleroma/web/metadata/twitter_card.ex

index 357b80a2d50e7959bd8d5b8dfe36d2468f25def9..4033ec38ff17d2592777565c47c8dc9c62686cb8 100644 (file)
@@ -121,4 +121,6 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
       acc ++ rendered_tags
     end)
   end
+
+  defp build_attachments(_), do: []
 end
index 040b872e7034d840705ffb324628d223a9f197b3..9baf5ac9747db9d90540bba094560bf50c3b3de4 100644 (file)
@@ -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)