1
0
Fork 0
forked from gitea/nas

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

This commit is contained in:
KMY 2024-01-24 20:37:27 +09:00
parent 201fd37bc3
commit d87a11bc7d
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