added 'unconfirmed' filter to admin/users

This commit is contained in:
Maksim Pechnikov 2020-09-21 09:33:51 +03:00
commit 9ef46ce410
4 changed files with 131 additions and 339 deletions

View file

@ -43,6 +43,7 @@ defmodule Pleroma.User.Query do
active: boolean(),
deactivated: boolean(),
need_approval: boolean(),
need_confirmed: boolean(),
is_admin: boolean(),
is_moderator: boolean(),
super_users: boolean(),
@ -156,6 +157,10 @@ defmodule Pleroma.User.Query do
where(query, [u], u.approval_pending)
end
defp compose_query({:need_confirmed, _}, query) do
where(query, [u], u.confirmation_pending)
end
defp compose_query({:followers, %User{id: id}}, query) do
query
|> where([u], u.id != ^id)