From 7d7844a47fdfb8862847f025dc4c1b1bc5fdafe5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 10 Sep 2017 09:58:38 +0200 Subject: Default follows for new users (#4871) When a new user confirms their e-mail, bootstrap their home timeline by automatically following a set of accounts. By default, all local admin accounts (that are unlocked). Can be customized by new admin setting (comma-separated usernames, local and unlocked only) --- app/controllers/auth/confirmations_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/controllers/auth/confirmations_controller.rb') diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index 2fdb281f4..d5e8e58ed 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -2,4 +2,10 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController layout 'auth' + + def show + super do |user| + BootstrapTimelineWorker.perform_async(user.account_id) if user.errors.empty? + end + end end -- cgit