mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 02:02:19 +00:00
[Pleroma.Web.MastodonAPI.StatusView] Support Peertube Video titles
This commit is contained in:
parent
f5b056e3ce
commit
046741c60d
|
@ -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"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue