aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/emails/user_email.ex13
-rw-r--r--lib/pleroma/user.ex6
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/pleroma/emails/user_email.ex b/lib/pleroma/emails/user_email.ex
index 1d8c72ae9..831e5464f 100644
--- a/lib/pleroma/emails/user_email.ex
+++ b/lib/pleroma/emails/user_email.ex
@@ -93,6 +93,19 @@ defmodule Pleroma.Emails.UserEmail do
|> html_body(html_body)
end
+ def approval_pending_email(user) do
+ html_body = """
+ <h3>Awaiting Approval</h3>
+ <p>Your account at #{instance_name()} is being reviewed by staff. You will receive another email once your account is approved.</p>
+ """
+
+ new()
+ |> to(recipient(user))
+ |> from(sender())
+ |> subject("Your account is awaiting approval")
+ |> html_body(html_body)
+ end
+
@doc """
Email used in digest email notifications
Includes Mentions and New Followers data
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 3a4f031b1..cde9ff0eb 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -779,7 +779,11 @@ defmodule Pleroma.User do
end
def post_register_action(%User{approval_pending: true} = user) do
- # TODO: Send approval explanation email
+ # Send approval pending email
+ user
+ |> Pleroma.Emails.UserEmail.approval_pending_email()
+ |> Pleroma.Emails.Mailer.deliver_async()
+
{:ok, user}
end