Simplify the value comparison
authorMark Felder <feld@FreeBSD.org>
Fri, 25 Sep 2020 15:37:59 +0000 (10:37 -0500)
committerMark Felder <feld@FreeBSD.org>
Fri, 25 Sep 2020 15:37:59 +0000 (10:37 -0500)
lib/mix/tasks/pleroma/user.ex

index d502056005812c63425a740d95127a19d8d4f432..e062628047b402d192a0a4be3cd41e1f5020c7ae 100644 (file)
@@ -455,11 +455,7 @@ defmodule Mix.Tasks.Pleroma.User do
   end
 
   defp set_confirmed(user, value) do
-    {:ok, user} =
-      case value do
-        true -> User.need_confirmation(user, false)
-        false -> User.need_confirmation(user, true)
-      end
+    {:ok, user} = User.need_confirmation(user, !value)
 
     shell_info("Confirmation pending status of #{user.nickname}: #{user.confirmation_pending}")
     user