Replace User.toggle_confirmation/1 with User.confirm/1, fixes #2235

This commit is contained in:
Alex Gleason 2020-10-13 21:52:06 -05:00
commit dc38dc8472
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
7 changed files with 13 additions and 42 deletions

View file

@ -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"