Merge branch 'bugfix/trans_fix_url_videos' into 'develop'
Fix "url" of Videos in transmogrifier Closes #367 See merge request pleroma/pleroma!459
This commit is contained in:
commit
005b4194ff
7 changed files with 97 additions and 14 deletions
|
|
@ -171,14 +171,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
|
|||
HTML.filter_tags(content, User.html_filter_policy(opts[:for]))
|
||||
|> Formatter.emojify(object["emoji"])
|
||||
|
||||
video =
|
||||
if object["type"] == "Video" do
|
||||
[object]
|
||||
else
|
||||
[]
|
||||
end
|
||||
|
||||
attachments = (object["attachment"] || []) ++ video
|
||||
attachments = object["attachment"] || []
|
||||
|
||||
reply_parent = Activity.get_in_reply_to_activity(activity)
|
||||
|
||||
|
|
|
|||
|
|
@ -303,7 +303,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||
{summary, content}
|
||||
end
|
||||
|
||||
def render_content(%{"type" => object_type} = object) when object_type in ["Article", "Page"] do
|
||||
def render_content(%{"type" => object_type} = object)
|
||||
when object_type in ["Article", "Page", "Video"] do
|
||||
summary = object["name"] || object["summary"]
|
||||
|
||||
content =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue