Make new users follow themselves.
authorRoger Braun <roger@rogerbraun.net>
Fri, 14 Apr 2017 15:29:27 +0000 (17:29 +0200)
committerRoger Braun <roger@rogerbraun.net>
Fri, 14 Apr 2017 15:29:27 +0000 (17:29 +0200)
lib/mix/tasks/register_user.ex

index e2f36c34cf4a6f6356f2cccec50fb6bcb42fd9a6..17535f19011880aab7f770bb172cbc90f01604b2 100644 (file)
@@ -14,7 +14,7 @@ defmodule Mix.Tasks.RegisterUser do
       bio: bio
     }
 
-    user = %{ user | ap_id: User.ap_id(user) }
+    user = %{ user | ap_id: User.ap_id(user), following: User.ap_followers(user) }
 
     Repo.insert!(user)
   end