projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb118b2
)
Don't add summary if empty.
author
eal
<eal@waifu.club>
Sat, 18 Nov 2017 13:25:22 +0000
(15:25 +0200)
committer
eal
<eal@waifu.club>
Sat, 18 Nov 2017 13:25:22 +0000
(15:25 +0200)
lib/pleroma/web/twitter_api/representers/activity_representer.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index 3fbeb86ba94c50c8438a9eab65e28bcd2407b643..b17013d875141c255b4b4a98a7d1e27106f5bd22 100644
(file)
--- a/
lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/
lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@
-135,8
+135,9
@@
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>"
+ summary = activity.data["object"]["summary"]
+ content = if !!summary and summary != "" do
+ "<span>#{activity.data["object"]["summary"]}</span><br />#{content}</span>"
else
content
end