Add block support with antenna

This commit is contained in:
KMY 2023-04-24 18:58:15 +09:00
parent 326ad83c71
commit eac2950e5b

View file

@ -126,6 +126,7 @@ class FanOutOnWriteService < BaseService
antennas.in_batches do |ans|
ans.each do |antenna|
next if !antenna.enabled?
next if @status.account.blocking?(antenna.account)
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? && antenna.exclude_keywords.any? { |keyword| @status.text.include?(keyword) }