Assert on the success of enqueue before returning

This commit is contained in:
Sadposter 2019-04-14 16:05:26 +01:00
parent 5e45557751
commit 16d8c8b33b
1 changed files with 4 additions and 3 deletions

View File

@ -278,6 +278,7 @@ def register(%Ecto.Changeset{} = changeset) do
def try_send_confirmation_email(%User{} = user) do
if user.info.confirmation_pending &&
Pleroma.Config.get([:instance, :account_activation_required]) do
:ok =
user
|> Pleroma.Emails.UserEmail.account_confirmation_email()
|> Pleroma.Emails.Mailer.deliver_async()