Commit 5e455577 authored by Sadposter's avatar Sadposter

Always return {atom, _} from try_send_confirmation

parent ec42b639
......@@ -270,7 +270,7 @@ def register(%Ecto.Changeset{} = changeset) do
with {:ok, user} <- Repo.insert(changeset),
{:ok, user} <- autofollow_users(user),
{:ok, _} <- Pleroma.User.WelcomeMessage.post_welcome_message_to_user(user),
:ok <- try_send_confirmation_email(user) do
{:ok, _} <- try_send_confirmation_email(user) do
{:ok, user}
end
end
......@@ -281,6 +281,8 @@ def try_send_confirmation_email(%User{} = user) do
user
|> Pleroma.Emails.UserEmail.account_confirmation_email()
|> Pleroma.Emails.Mailer.deliver_async()
{:ok, :enqueued}
else
{:ok, :noop}
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment