From 490ca3be583aca9ad43cf4fd3aafeb6f462f388f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 6 Jan 2021 14:59:03 -0600 Subject: [PATCH] AdminAPI: return last_known_ip, fixes #1708 --- lib/pleroma/web/admin_api/views/account_view.ex | 3 ++- test/pleroma/web/admin_api/controllers/user_controller_test.exs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/admin_api/views/account_view.ex b/lib/pleroma/web/admin_api/views/account_view.ex index 8bac24d3e..4f9cba89d 100644 --- a/lib/pleroma/web/admin_api/views/account_view.ex +++ b/lib/pleroma/web/admin_api/views/account_view.ex @@ -80,7 +80,8 @@ defmodule Pleroma.Web.AdminAPI.AccountView do "approval_pending" => user.approval_pending, "url" => user.uri || user.ap_id, "registration_reason" => user.registration_reason, - "actor_type" => user.actor_type + "actor_type" => user.actor_type, + "last_known_ip" => user.last_known_ip } end diff --git a/test/pleroma/web/admin_api/controllers/user_controller_test.exs b/test/pleroma/web/admin_api/controllers/user_controller_test.exs index 5705306c7..7d9c6b2ad 100644 --- a/test/pleroma/web/admin_api/controllers/user_controller_test.exs +++ b/test/pleroma/web/admin_api/controllers/user_controller_test.exs @@ -963,7 +963,8 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do "approval_pending" => false, "url" => user.ap_id, "registration_reason" => nil, - "actor_type" => "Person" + "actor_type" => "Person", + "last_known_ip" => nil } |> Map.merge(attrs) end