Merge branch 'kb_development' into kb_migration
This commit is contained in:
commit
c4367544d7
27 changed files with 349 additions and 40 deletions
|
@ -131,7 +131,6 @@ class FanOutOnWriteService < BaseService
|
|||
antennas.in_batches do |ans|
|
||||
ans.each do |antenna|
|
||||
next if !antenna.enabled?
|
||||
next if antenna.keywords.any? && !([nil, :public].include?(@status.searchability&.to_sym))
|
||||
next if antenna.keywords.any? && !antenna.keywords.any? { |keyword| @status.text.include?(keyword) }
|
||||
next if antenna.exclude_keywords&.any? { |keyword| @status.text.include?(keyword) }
|
||||
next if antenna.exclude_accounts&.include?(@status.account_id)
|
||||
|
|
|
@ -21,12 +21,16 @@ class UpdateAccountService < BaseService
|
|||
|
||||
def authorize_all_follow_requests(account)
|
||||
follow_requests = FollowRequest.where(target_account: account)
|
||||
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? }
|
||||
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? && !reject_straight_follow_domains.include?(req.account.domain) }
|
||||
AuthorizeFollowWorker.push_bulk(follow_requests, limit: 1_000) do |req|
|
||||
[req.account_id, req.target_account_id]
|
||||
end
|
||||
end
|
||||
|
||||
def reject_straight_follow_domains
|
||||
DomainBlock.where(reject_straight_follow: true).pluck(:domain)
|
||||
end
|
||||
|
||||
def check_links(account)
|
||||
VerifyAccountLinksWorker.perform_async(account.id) if account.fields.any?(&:requires_verification?)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue