[Pleroma.Web.MastodonAPI.StatusView] Support Peertube Video titles

parent f5b056e3
......@@ -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
"<p><a href=\"#{object["url"]}\">#{name}</a></p>#{object["content"]}"
else
object["content"]
end
HtmlSanitizeEx.basic_html(content)
end
def render_content(%{"type" => "Article"} = object) do
summary = object["name"]
......
Markdown is supported
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