From 8a880a3d464daf486a10d85b8ee49305aa6b1e5b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 24 Jan 2017 21:40:41 +0100 Subject: 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 --- app/controllers/api/v1/accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/api/v1') 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 } -- cgit