forked from AkkomaGang/akkoma
[Pleroma.Web.MastodonAPI.StatusView] Support Peertube Video titles
This commit is contained in:
parent
f5b056e3ce
commit
046741c60d
1 changed files with 13 additions and 0 deletions
|
@ -211,6 +211,19 @@ def get_visibility(object) do
|
||||||
end
|
end
|
||||||
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
|
def render_content(%{"type" => "Article"} = object) do
|
||||||
summary = object["name"]
|
summary = object["name"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue