Use follow_all in autofollow.
authorlain <lain@soykaf.club>
Wed, 9 Jan 2019 10:38:45 +0000 (11:38 +0100)
committerlain <lain@soykaf.club>
Wed, 9 Jan 2019 10:38:45 +0000 (11:38 +0100)
lib/pleroma/user.ex

index 916b1435092bea90ace31e88b93cc851ff155f8d..a49fa3fcd74c5f72c130c3249a4deb1e1fa19602 100644 (file)
@@ -247,10 +247,7 @@ defmodule Pleroma.User do
       )
       |> Repo.all()
 
-    autofollowed_users
-    |> Enum.reduce({:ok, user}, fn other_user, {:ok, user} ->
-      follow(user, other_user)
-    end)
+    follow_all(user, autofollowed_users)
   end
 
   @doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)"