Twitter API: Support Mastodon-style bios
[akkoma] / lib / pleroma / web / twitter_api / views / activity_view.ex
index 0779872fe2f122b337c410b6200ca7f5fdaad5df..55b5287f5e2bb4e94cfcde2bdc7ea646a2009f00 100644 (file)
@@ -255,12 +255,14 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
       "tags" => tags,
       "activity_type" => "post",
       "possibly_sensitive" => possibly_sensitive,
-      "visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object)
+      "visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
+      "summary" => summary
     }
   end
 
   def render_content(%{"type" => "Note"} = object) do
     summary = object["summary"]
+
     content =
       if !!summary and summary != "" do
         "<p>#{summary}</p>#{object["content"]}"
@@ -273,6 +275,7 @@ 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"]}"