Fix toggle_activated in mix task User
This commit is contained in:
parent
2592b3c81a
commit
a40ba3ba57
@ -142,8 +142,11 @@ defmodule Mix.Tasks.Pleroma.User do
|
||||
Common.start_pleroma()
|
||||
|
||||
with %User{} = user <- User.get_by_nickname(nickname) do
|
||||
User.deactivate(user, !user.info["deactivated"])
|
||||
Mix.shell().info("Activation status of #{nickname}: #{user.info["deactivated"]}")
|
||||
{:ok, user} = User.deactivate(user, !user.info.deactivated)
|
||||
|
||||
Mix.shell().info(
|
||||
"Activation status of #{nickname}: #{if(user.info.deactivated, do: "de", else: "")}activated"
|
||||
)
|
||||
else
|
||||
_ ->
|
||||
Mix.shell().error("No user #{nickname}")
|
||||
|
Loading…
Reference in New Issue
Block a user