Add: Misskeyに相互限定投稿を配送しないオプション (#499)

This commit is contained in:
KMY(雪あすか) 2024-01-24 21:36:31 +09:00 committed by GitHub
parent 306b96f04c
commit 2860765866
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 55 additions and 14 deletions

View file

@ -105,7 +105,10 @@ class ProcessMentionsService < BaseService
def process_mutual!
mentioned_account_ids = @current_mentions.map(&:account_id)
@status.account.mutuals.reorder(nil).find_each do |target_account|
mutuals = @status.account.mutuals
mutuals = mutuals.where.not(domain: InstanceInfo.where(software: 'misskey').select(:domain)).or(mutuals.where(domain: nil)) if @status.account.user&.setting_reject_send_limited_to_suspects
mutuals.reorder(nil).find_each do |target_account|
@current_mentions << @status.mentions.new(silent: true, account: target_account) unless mentioned_account_ids.include?(target_account.id)
end
end