Fix toggle_deactivated to reactivate a deactivated user
authorrinpatch <rinpatch@sdf.org>
Sat, 1 Dec 2018 15:33:53 +0000 (18:33 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 1 Dec 2018 15:33:53 +0000 (18:33 +0300)
lib/mix/tasks/pleroma/user.ex

index c20fecaa1a1a5a43803c4f1d4b5fdf8d5b94107e..c7c69ed012ca86c7fbd39619c83e0639c7631b37 100644 (file)
@@ -122,7 +122,7 @@ defmodule Mix.Tasks.Pleroma.User do
     Mix.Task.run("app.start")
 
     with user <- User.get_by_nickname(nickname) do
-      User.deactivate(user)
+      User.deactivate(user, !user.info["deactivated"])
     end
   end