Commit 7f609ee8 authored by rinpatch's avatar rinpatch
Browse files

OGP/TwitterCard: Add fallbacks in case the attachment key is nonexistent

parent 3589b30d
......@@ -121,4 +121,6 @@ defp build_attachments(%{data: %{"attachment" => attachments}}) do
acc ++ rendered_tags
end)
end
defp build_attachments(_), do: []
end
......@@ -116,6 +116,7 @@ defp build_attachments(id, %{data: %{"attachment" => attachments}}) 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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment