From: Haelwenn (lanodan) Monnier Date: Thu, 9 Aug 2018 23:19:00 +0000 (+0200) Subject: [Pleroma.Web.MastodonAPI.StatusView] Support Peertube Video titles X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=046741c60d46d5f4de5356af79022bcb05bbaad6;p=akkoma [Pleroma.Web.MastodonAPI.StatusView] Support Peertube Video titles --- diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 7226a407e..3eca43a92 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -211,6 +211,19 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do end end + def render_content(%{"type" => "Video"} = object) do + name = object["name"] + + content = + if !!name and name != "" do + "

#{name}

#{object["content"]}" + else + object["content"] + end + + HtmlSanitizeEx.basic_html(content) + end + def render_content(%{"type" => "Article"} = object) do summary = object["name"]