Commit 563f04e8 authored by lain's avatar lain

Do autofollow first.

parent bbd0049f
......@@ -250,8 +250,8 @@ defp autofollow_users(user) do
@doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)"
def register(%Ecto.Changeset{} = changeset) do
with {:ok, user} <- Repo.insert(changeset),
{:ok, _} <- try_send_confirmation_email(user),
{:ok, user} <- autofollow_users(user) do
{:ok, user} <- autofollow_users(user),
{:ok, _} <- try_send_confirmation_email(user) do
{:ok, user}
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