Merge branch 'scarlett/pleroma-summary-html-api' into 'develop'
Scarlett/pleroma summary html api See merge request pleroma/pleroma!647
This commit is contained in:
commit
1881680e28
4 changed files with 20 additions and 7 deletions
|
|
@ -181,6 +181,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
|
|||
|
||||
reply_user = reply_parent && User.get_cached_by_ap_id(reply_parent.actor)
|
||||
|
||||
summary = HTML.strip_tags(object["summary"])
|
||||
|
||||
%{
|
||||
"id" => activity.id,
|
||||
"uri" => activity.data["object"]["id"],
|
||||
|
|
@ -207,7 +209,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
|
|||
"activity_type" => "post",
|
||||
"possibly_sensitive" => possibly_sensitive,
|
||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
|
||||
"summary" => HTML.strip_tags(object["summary"]) |> Formatter.emojify(object["emoji"])
|
||||
"summary" => summary,
|
||||
"summary_html" => summary |> Formatter.emojify(object["emoji"])
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -279,6 +279,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||
|
||||
reply_user = reply_parent && User.get_cached_by_ap_id(reply_parent.actor)
|
||||
|
||||
summary = HTML.strip_tags(summary)
|
||||
|
||||
%{
|
||||
"id" => activity.id,
|
||||
"uri" => activity.data["object"]["id"],
|
||||
|
|
@ -305,7 +307,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||
"activity_type" => "post",
|
||||
"possibly_sensitive" => possibly_sensitive,
|
||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
|
||||
"summary" => HTML.strip_tags(summary) |> Formatter.emojify(object["emoji"])
|
||||
"summary" => summary,
|
||||
"summary_html" => summary |> Formatter.emojify(object["emoji"])
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue