commit: d111eae798eb80089acc15ad2b9c0297febfaee1
parent: 6fb900a496e1797c1a3b438db9f96b09d9546f1d
Author: lain <lain@soykaf.club>
Date: Tue, 2 Jun 2020 08:49:24 +0000
Merge branch 'feature/status-by-id-account-view' into 'develop'
another view for account in admin-fe status_show
Closes #1783
See merge request pleroma/pleroma!2543
Diffstat:
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/pleroma/web/admin_api/controllers/status_controller.ex b/lib/pleroma/web/admin_api/controllers/status_controller.ex
@@ -42,7 +42,7 @@ defmodule Pleroma.Web.AdminAPI.StatusController do
def show(conn, %{id: id}) do
with %Activity{} = activity <- Activity.get_by_id(id) do
conn
- |> put_view(MastodonAPI.StatusView)
+ |> put_view(Pleroma.Web.AdminAPI.StatusView)
|> render("show.json", %{activity: activity})
else
nil -> {:error, :not_found}
diff --git a/test/web/admin_api/controllers/status_controller_test.exs b/test/web/admin_api/controllers/status_controller_test.exs
@@ -42,6 +42,14 @@ defmodule Pleroma.Web.AdminAPI.StatusControllerTest do
|> json_response_and_validate_schema(200)
assert response["id"] == activity.id
+
+ account = response["account"]
+ actor = User.get_by_ap_id(activity.actor)
+
+ assert account["id"] == actor.id
+ assert account["nickname"] == actor.nickname
+ assert account["deactivated"] == actor.deactivated
+ assert account["confirmation_pending"] == actor.confirmation_pending
end
end