Don't add summary if empty.

This commit is contained in:
eal 2017-11-18 15:25:22 +02:00
parent fb118b2978
commit 31e4277ba5

View File

@ -135,8 +135,9 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
tags = activity.data["object"]["tag"] || [] tags = activity.data["object"]["tag"] || []
possibly_sensitive = Enum.member?(tags, "nsfw") possibly_sensitive = Enum.member?(tags, "nsfw")
content = if activity.data["object"]["summary"] do summary = activity.data["object"]["summary"]
"<span>#{activity.data["object"]["summary"]}</span><br>#{content}</span>" content = if !!summary and summary != "" do
"<span>#{activity.data["object"]["summary"]}</span><br />#{content}</span>"
else else
content content
end end