Merge branch 'develop' into refactor/discoverable_user_field
[akkoma] / lib / pleroma / web / admin_api / views / account_view.ex
index bdab04ad2200098f4ad3f6c44c718b404bf9fcc7..5f3a78a0ffc6f6ae7fd0c59c8e9d7cd092b5b0c2 100644 (file)
@@ -52,7 +52,7 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
       :skip_thread_containment,
       :pleroma_settings_store,
       :raw_fields,
-      :discoverable,
+      :is_discoverable,
       :actor_type
     ])
     |> Map.merge(%{
@@ -79,7 +79,8 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
       "confirmation_pending" => user.confirmation_pending,
       "approval_pending" => user.approval_pending,
       "url" => user.uri || user.ap_id,
-      "registration_reason" => user.registration_reason
+      "registration_reason" => user.registration_reason,
+      "actor_type" => user.actor_type
     }
   end
 
@@ -107,7 +108,7 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
   end
 
   def merge_account_views(%User{} = user) do
-    MastodonAPI.AccountView.render("show.json", %{user: user})
+    MastodonAPI.AccountView.render("show.json", %{user: user, skip_visibility_check: true})
     |> Map.merge(AdminAPI.AccountView.render("show.json", %{user: user}))
   end