Do autofollow first.
authorlain <lain@soykaf.club>
Sat, 9 Feb 2019 12:39:57 +0000 (13:39 +0100)
committerlain <lain@soykaf.club>
Sat, 9 Feb 2019 12:39:57 +0000 (13:39 +0100)
lib/pleroma/user.ex

index cd7752554588cb9e3e66bf24ed5c96f653f8a05e..3610348876d6c2a0ee769dd40b64386fdfc2946c 100644 (file)
@@ -250,8 +250,8 @@ defmodule Pleroma.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}
     end
   end