Commit 31e4277b authored by eal's avatar eal
Browse files

Don't add summary if empty.

parent fb118b29
Pipeline #251 passed with stage
in 2 minutes and 48 seconds
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment