X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Ftwitter_api%2Fviews%2Fuser_view.ex;h=0791ed7608e1be3b3318d63a456f067d4d41ea02;hb=d0e94d5f1baac7a19d6cdd33b1f54470041e7227;hp=22f33e0b5d984bae61ad0269f1103705ec5b932d;hpb=9b63fda9c70f0fd3030ada951f3514221ae2e3aa;p=akkoma diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex index 22f33e0b5..0791ed760 100644 --- a/lib/pleroma/web/twitter_api/views/user_view.ex +++ b/lib/pleroma/web/twitter_api/views/user_view.ex @@ -9,7 +9,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do alias Pleroma.User alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MediaProxy - alias Pleroma.Web.TwitterAPI.UserView def render("show.json", %{user: user = %User{}} = assigns) do render_one(user, Pleroma.Web.TwitterAPI.UserView, "user.json", assigns) @@ -27,19 +26,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do else: %{} end - def render("index_for_admin.json", %{users: users} = opts) do - users - |> render_many(UserView, "show_for_admin.json", opts) - end - - def render("show_for_admin.json", %{user: user}) do - %{ - "id" => user.id, - "nickname" => user.nickname, - "deactivated" => user.info.deactivated - } - end - def render("short.json", %{ user: %User{ nickname: nickname, @@ -133,7 +119,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do "tags" => user.tags } |> maybe_with_activation_status(user, for_user) - |> maybe_with_follow_request_count(user, for_user) } data = @@ -155,14 +140,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do defp maybe_with_activation_status(data, _, _), do: data - defp maybe_with_follow_request_count(data, %User{id: id, info: %{locked: true}} = user, %User{ - id: id - }) do - Map.put(data, "follow_request_count", user.info.follow_request_count) - end - - defp maybe_with_follow_request_count(data, _, _), do: data - defp maybe_with_role(data, %User{id: id} = user, %User{id: id}) do Map.merge(data, %{"role" => role(user), "show_role" => user.info.show_role}) end