Documentation updates for stable release (#73)
[akkoma] / lib / mix / tasks / pleroma / email.ex
index 9972cb9880d590acb293903a595a346e93e9ac8b..d257cebe96fd262d09e4d61763f52973d98010db 100644 (file)
@@ -1,9 +1,13 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Mix.Tasks.Pleroma.Email do
   use Mix.Task
   import Mix.Pleroma
 
   @shortdoc "Email administrative tasks"
-  @moduledoc File.read!("docs/administration/CLI_tasks/email.md")
+  @moduledoc File.read!("docs/docs/administration/CLI_tasks/email.md")
 
   def run(["test" | args]) do
     start_pleroma()
@@ -29,12 +33,12 @@ defmodule Mix.Tasks.Pleroma.Email do
 
     Pleroma.User.Query.build(%{
       local: true,
-      deactivated: false,
-      confirmation_pending: true,
+      is_active: true,
+      is_confirmed: false,
       invisible: false
     })
     |> Pleroma.Repo.chunk_stream(500)
-    |> Stream.each(&Pleroma.User.try_send_confirmation_email(&1))
+    |> Stream.each(&Pleroma.User.maybe_send_confirmation_email(&1))
     |> Stream.run()
   end
 end