mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 00:09:35 +00:00
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 a new issue