twitter api: refactor activity html generation, add support for Articles
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 24 Jun 2018 05:33:34 +0000 (05:33 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Thu, 12 Jul 2018 16:11:42 +0000 (16:11 +0000)
lib/pleroma/web/twitter_api/views/activity_view.ex

index 55b5287f5e2bb4e94cfcde2bdc7ea646a2009f00..cb7c4cb9697c9e281901db80f508700849827718 100644 (file)
@@ -262,7 +262,6 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
 
   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 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView 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"]}"