aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-10-31 17:43:37 +0100
committerRoger Braun <roger@rogerbraun.net>2017-10-31 17:43:37 +0100
commit04217f52c92d5a287b317e10be4b42bf74b30e07 (patch)
tree6b093a859f7e26f7856c2b5d0dab56252b16593c /lib
parent4cbf17dac6c9501e9fc711d04540da9afbcad717 (diff)
downloadpleroma-04217f52c92d5a287b317e10be4b42bf74b30e07.tar.gz
TwitterAPI: Display cws.
Diffstat (limited to 'lib')
-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"])
%{