Twitter API: Add a summary_html field.
The intention here is to allow proper subject copying when it contains emoji, obviously this will require minor frontend changes, though.
This commit is contained in:
parent
b0e8e521fb
commit
52493467ac
4 changed files with 16 additions and 4 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue