Add block support with antenna

This commit is contained in:
KMY 2023-04-24 17:04:37 +09:00
parent 9d4b306f08
commit 69df23d8d9

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) }