aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/twitter_api')
-rw-r--r--lib/pleroma/web/twitter_api/representers/activity_representer.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index 929e26bf0..3fbeb86ba 100644
--- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@ -135,6 +135,12 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
tags = activity.data["object"]["tag"] || []
possibly_sensitive = Enum.member?(tags, "nsfw")
+ content = if activity.data["object"]["summary"] do
+ "<span>#{activity.data["object"]["summary"]}</span><br>#{content}</span>"
+ else
+ content
+ end
+
html = HtmlSanitizeEx.basic_html(content) |> Formatter.emojify(object["emoji"])
%{