Merge branch 'hotfix/ogp-cachex-fix' into 'develop'
[akkoma] / lib / pleroma / web / twitter_api / representers / activity_representer.ex
index 2a221cc66491e629a536fcaabf244035f0e835c2..47154829dfede3a57e6039ba68c07a111d1ffc2f 100644 (file)
@@ -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" => object["summary"]
+      "summary" => summary,
+      "summary_html" => summary |> Formatter.emojify(object["emoji"])
     }
   end