mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 11:53:13 +00:00
501514960a
* Make private toots get PuSHed to subscription URLs that belong to domains where you have approved followers * Authorized followers controller, stub for bulk action * Soft block in the background * Add simple test for new controller * Rename Settings::FollowersController to Settings::FollowerDomainsController, paginate results, rename "private" post setting to "followers-only", fix pagination style, improve post privacy preferences style, improve warning style * Extract compose form warnings into own container, show warning when posting to followers-only with unlocked account
18 lines
419 B
Ruby
18 lines
419 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SoftBlockWorker
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options queue: 'pull'
|
|
|
|
def perform(account_id, target_account_id)
|
|
account = Account.find(account_id)
|
|
target_account = Account.find(target_account_id)
|
|
|
|
BlockService.new.call(account, target_account)
|
|
UnblockService.new.call(account, target_account)
|
|
rescue ActiveRecord::RecordNotFound
|
|
true
|
|
end
|
|
end
|