allow `source` from misskey
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index 008040866adcdf09ad3e7879fe903687a448cc6b..b3d74254563b7db25981b2d4092912b4120074ca 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)
 
@@ -329,7 +328,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
         )
 
     {pinned?, pinned_at} = pin_data(object, user)
-
     %{
       id: to_string(activity.id),
       uri: object.data["id"],
@@ -376,6 +374,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