diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-06-09 22:46:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-09 22:46:54 +0200 |
commit | 10f51c9886123982bc9f2a95fba39dd1f24b9a05 (patch) | |
tree | 16be79ea33b963008b9dada14d4454062bf97b96 /app/controllers | |
parent | 91e5d9f8af3a06c329de4bd603dc904a2a297e15 (diff) |
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
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/domain_blocks_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/settings/follower_domains_controller.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/api/v1/domain_blocks_controller.rb b/app/controllers/api/v1/domain_blocks_controller.rb index ae6ad7936..e55d622c3 100644 --- a/app/controllers/api/v1/domain_blocks_controller.rb +++ b/app/controllers/api/v1/domain_blocks_controller.rb @@ -15,7 +15,8 @@ class Api::V1::DomainBlocksController < Api::BaseController end def create - BlockDomainFromAccountService.new.call(current_account, domain_block_params[:domain]) + current_account.block_domain!(domain_block_params[:domain]) + AfterAccountDomainBlockWorker.perform_async(current_account.id, domain_block_params[:domain]) render_empty end diff --git a/app/controllers/settings/follower_domains_controller.rb b/app/controllers/settings/follower_domains_controller.rb index 91b521e7f..a128bd136 100644 --- a/app/controllers/settings/follower_domains_controller.rb +++ b/app/controllers/settings/follower_domains_controller.rb @@ -13,7 +13,7 @@ class Settings::FollowerDomainsController < ApplicationController def update domains = bulk_params[:select] || [] - SoftBlockDomainFollowersWorker.push_bulk(domains) do |domain| + AfterAccountDomainBlockWorker.push_bulk(domains) do |domain| [current_account.id, domain] end |