about summary refs log tree commit diff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-24 21:40:41 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-24 21:40:41 +0100
commit8a880a3d464daf486a10d85b8ee49305aa6b1e5b (patch)
treecc143c4fc9b5e5fd359c2ae51a78ab78297ca627 /app/controllers/api/v1
parent326c75b35b826aa9e807fe7d1972ade41d789663 (diff)
Make blocks create entries and unfollows instantly, but do the clean up
in the background instead. Should fix delay where blocked person
can interact with blocker for a short time before background job
gets processed
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index a43619193..d97010c0e 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -65,7 +65,7 @@ class Api::V1::AccountsController < ApiController
   end
 
   def block
-    BlockWorker.perform_async(current_user.account_id, @account.id)
+    BlockService.new.call(current_user.account, @account)
 
     @following   = { @account.id => false }
     @followed_by = { @account.id => false }