Pleroma.Web.MastodonAPI.StatusView: Do not fail when URL isn’t a string

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-11-01 09:55:38 +01:00
parent 33587f5cb4
commit 755f166406
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -240,7 +240,7 @@ def render_content(%{"type" => "Article"} = object) do
summary = object["name"]
content =
if !!summary and summary != "" do
if !!summary and summary != "" and is_bitstring(object["url"]) do
"<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
else
object["content"]