From 10f51c9886123982bc9f2a95fba39dd1f24b9a05 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Jun 2018 22:46:54 +0200 Subject: Fix domain hiding logic (#7765) * Send rejections to followers when user hides domain they're on * Use account domain blocks for "authorized followers" action Replace soft-blocking (block & unblock) behaviour with follow rejection * Split sync and async work of account domain blocking Do not create domain block when removing followers by domain, that is probably unexpected from the user's perspective. * Adjust confirmation message for domain block * yarn manage:translations --- app/workers/after_account_domain_block_worker.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/workers/after_account_domain_block_worker.rb (limited to 'app/workers/after_account_domain_block_worker.rb') diff --git a/app/workers/after_account_domain_block_worker.rb b/app/workers/after_account_domain_block_worker.rb new file mode 100644 index 000000000..043c33311 --- /dev/null +++ b/app/workers/after_account_domain_block_worker.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AfterAccountDomainBlockWorker + include Sidekiq::Worker + + def perform(account_id, domain) + AfterBlockDomainFromAccountService.new.call(Account.find(account_id), domain) + rescue ActiveRecord::RecordNotFound + true + end +end -- cgit