0
0
Fork 0

Move merging/unmerging of timelines into background. Move blocking into

background as well since it's a computationally expensive
This commit is contained in:
Eugen Rochko 2017-01-23 21:29:34 +01:00
parent f392030ab8
commit cca82bf0a2
7 changed files with 45 additions and 19 deletions

View file

@ -65,8 +65,13 @@ class Api::V1::AccountsController < ApiController
end
def block
BlockService.new.call(current_user.account, @account)
set_relationship
BlockWorker.perform_async(current_user.account_id, @account.id)
@following = { @account.id => false }
@followed_by = { @account.id => false }
@blocking = { @account.id => true }
@requested = { @account.id => false }
render action: :relationship
end