Commit 152a5262 authored by Ariadne Conill's avatar Ariadne Conill

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

parent 3b799f22
...@@ -262,7 +262,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do ...@@ -262,7 +262,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
def render_content(%{"type" => "Note"} = object) do def render_content(%{"type" => "Note"} = object) do
summary = object["summary"] summary = object["summary"]
content = content =
if !!summary and summary != "" do if !!summary and summary != "" do
"<p>#{summary}</p>#{object["content"]}" "<p>#{summary}</p>#{object["content"]}"
...@@ -275,7 +274,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do ...@@ -275,7 +274,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
def render_content(%{"type" => "Article"} = object) do def render_content(%{"type" => "Article"} = object) do
summary = object["name"] || object["summary"] summary = object["name"] || object["summary"]
content = content =
if !!summary and summary != "" do if !!summary and summary != "" do
"<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}" "<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
......
Markdown is supported
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