Don't add summary if empty.
This commit is contained in:
parent
fb118b2978
commit
31e4277ba5
|
@ -135,8 +135,9 @@ def to_map(%Activity{data: %{"object" => %{"content" => content} = object}} = ac
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue