Replace User.toggle_confirmation/1 with User.confirm/1, fixes #2235
This commit is contained in:
parent
c3112fd13a
commit
dc38dc8472
7 changed files with 13 additions and 42 deletions
|
|
@ -345,11 +345,11 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
end
|
||||
end
|
||||
|
||||
def run(["toggle_confirmed", nickname]) do
|
||||
def run(["confirm", nickname]) do
|
||||
start_pleroma()
|
||||
|
||||
with %User{} = user <- User.get_cached_by_nickname(nickname) do
|
||||
{:ok, user} = User.toggle_confirmation(user)
|
||||
{:ok, user} = User.confirm(user)
|
||||
|
||||
message = if user.confirmation_pending, do: "needs", else: "doesn't need"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue