Merge branch 'feature/peertube_2' into 'develop'
rebase/update of feature/peertube See merge request pleroma/pleroma!217
This commit is contained in:
commit
f6b06d2ac8
10 changed files with 104 additions and 32 deletions
|
|
@ -170,6 +170,15 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
|
|||
HtmlSanitizeEx.basic_html(content)
|
||||
|> Formatter.emojify(object["emoji"])
|
||||
|
||||
video =
|
||||
if object["type"] == "Video" do
|
||||
vid = [object]
|
||||
else
|
||||
[]
|
||||
end
|
||||
|
||||
attachments = (object["attachment"] || []) ++ video
|
||||
|
||||
%{
|
||||
"id" => activity.id,
|
||||
"uri" => activity.data["object"]["id"],
|
||||
|
|
@ -181,7 +190,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
|
|||
"created_at" => created_at,
|
||||
"in_reply_to_status_id" => object["inReplyToStatusId"],
|
||||
"statusnet_conversation_id" => conversation_id,
|
||||
"attachments" => (object["attachment"] || []) |> ObjectRepresenter.enum_to_list(opts),
|
||||
"attachments" => attachments |> ObjectRepresenter.enum_to_list(opts),
|
||||
"attentions" => attentions,
|
||||
"fave_num" => like_count,
|
||||
"repeat_num" => announcement_count,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter do
|
|||
|
||||
%{
|
||||
url: url["href"] |> Pleroma.Web.MediaProxy.url(),
|
||||
mimetype: url["mediaType"],
|
||||
mimetype: url["mediaType"] || url["mimeType"],
|
||||
id: data["uuid"],
|
||||
oembed: false
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter do
|
|||
def to_map(%Object{data: %{"url" => url} = data}, _opts) when is_binary(url) do
|
||||
%{
|
||||
url: url |> Pleroma.Web.MediaProxy.url(),
|
||||
mimetype: data["mediaType"],
|
||||
mimetype: data["mediaType"] || url["mimeType"],
|
||||
id: data["uuid"],
|
||||
oembed: false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue