Do autofollow first.

This commit is contained in:
lain 2019-02-09 13:39:57 +01:00
parent bbd0049fae
commit 563f04e81b

View File

@ -250,8 +250,8 @@ defmodule Pleroma.User do
@doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)" @doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)"
def register(%Ecto.Changeset{} = changeset) do def register(%Ecto.Changeset{} = changeset) do
with {:ok, user} <- Repo.insert(changeset), with {:ok, user} <- Repo.insert(changeset),
{:ok, _} <- try_send_confirmation_email(user), {:ok, user} <- autofollow_users(user),
{:ok, user} <- autofollow_users(user) do {:ok, _} <- try_send_confirmation_email(user) do
{:ok, user} {:ok, user}
end end
end end