diff options
author | eal <eal@waifu.club> | 2017-11-18 15:25:22 +0200 |
---|---|---|
committer | eal <eal@waifu.club> | 2017-11-18 15:25:22 +0200 |
commit | 31e4277ba5a2a793a0bc94f5d7682a48349583a3 (patch) | |
tree | 3aad314eca99a9e97c607e68203859f1a762055f /lib | |
parent | fb118b2978686a44a15534b638ab7887fb38c03d (diff) | |
download | pleroma-31e4277ba5a2a793a0bc94f5d7682a48349583a3.tar.gz |
Don't add summary if empty.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/twitter_api/representers/activity_representer.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index 3fbeb86ba..b17013d87 100644 --- 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 |