From: Haelwenn (lanodan) Monnier Date: Thu, 1 Nov 2018 08:55:38 +0000 (+0100) Subject: Pleroma.Web.MastodonAPI.StatusView: Do not fail when URL isn’t a string X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=755f166406afbe7def824139fb52d1bc442165b2;p=akkoma Pleroma.Web.MastodonAPI.StatusView: Do not fail when URL isn’t a string --- diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 80e80c8f5..1efd99470 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -240,7 +240,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do summary = object["name"] content = - if !!summary and summary != "" do + if !!summary and summary != "" and is_bitstring(object["url"]) do "

#{summary}

#{object["content"]}" else object["content"]