Merge pull request 'Change default Postgres user/DB to akkoma' (#63) from norm/akkoma...
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index e4057f108850c27bbaa6dd9378685c5250c0f238..c0f467592d4cb02aaf552bb699924c7906055c9a 100644 (file)
@@ -80,7 +80,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
 
   def render("index.json", opts) do
     reading_user = opts[:for]
-
     # To do: check AdminAPIControllerTest on the reasons behind nil activities in the list
     activities = Enum.filter(opts.activities, & &1)
 
@@ -304,6 +303,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
         _e ->
           nil
       end
+
     emoji_reactions =
       object.data
       |> Map.get("reactions", [])
@@ -375,6 +375,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
         emoji_reactions: emoji_reactions,
         parent_visible: visible_for_user?(reply_to, opts[:for]),
         pinned_at: pinned_at
+      },
+      akkoma: %{
+        source: object.data["source"]
       }
     }
   end
@@ -572,7 +575,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
     %{
       name: emoji,
       count: length(users),
-      url: url,
+      url: MediaProxy.url(url),
       me: !!(current_user && current_user.ap_id in users)
     }
   end