twitter api: refactor activity html generation, add support for Articles

This commit is contained in:
William Pitcock 2018-06-24 05:33:34 +00:00
parent 3b799f22b7
commit 152a526237

View file

@ -262,7 +262,6 @@ def render(
def render_content(%{"type" => "Note"} = object) do
summary = object["summary"]
content =
if !!summary and summary != "" do
"<p>#{summary}</p>#{object["content"]}"
@ -275,7 +274,6 @@ def render_content(%{"type" => "Note"} = object) do
def render_content(%{"type" => "Article"} = object) do
summary = object["name"] || object["summary"]
content =
if !!summary and summary != "" do
"<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"