about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-09-10 13:04:27 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-09-10 13:04:27 -0500
commit932571fa22273e6ff5c229147668c426b4d65326 (patch)
tree973b16e23a7cbeaf5a43550444e54aa1ace50a46 /app/controllers
parentc9df53044a333276853f7dc7ef2aed6d48df087f (diff)
parentab71cf4593ed3259168c641d5f4f5a0ebbe4d045 (diff)
Merge tag 'v1.6.0' into sync/upstream
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/settings_controller.rb1
-rw-r--r--app/controllers/api/v1/follows_controller.rb6
-rw-r--r--app/controllers/auth/confirmations_controller.rb6
3 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb
index 5985d6282..c5e6fe4e5 100644
--- a/app/controllers/admin/settings_controller.rb
+++ b/app/controllers/admin/settings_controller.rb
@@ -13,6 +13,7 @@ module Admin
       closed_registrations_message
       open_deletion
       timeline_preview
+      bootstrap_timeline_accounts
     ).freeze
 
     BOOLEAN_SETTINGS = %w(
diff --git a/app/controllers/api/v1/follows_controller.rb b/app/controllers/api/v1/follows_controller.rb
index e01ae5c01..5a2b2f32f 100644
--- a/app/controllers/api/v1/follows_controller.rb
+++ b/app/controllers/api/v1/follows_controller.rb
@@ -10,6 +10,12 @@ class Api::V1::FollowsController < Api::BaseController
     raise ActiveRecord::RecordNotFound if follow_params[:uri].blank?
 
     @account = FollowService.new.call(current_user.account, target_uri).try(:target_account)
+
+    if @account.nil?
+      username, domain = target_uri.split('@')
+      @account         = Account.find_remote!(username, domain)
+    end
+
     render json: @account, serializer: REST::AccountSerializer
   end
 
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