From a9fef4a8cfb8cc8055c979bffd96b36dbba2a9a9 Mon Sep 17 00:00:00 2001 From: KMY Date: Tue, 23 May 2023 14:30:53 +0900 Subject: [PATCH] Fix self unlisted posts are not picked by stl antennas --- app/services/fan_out_on_write_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 53d8cfa3ab..ac9f91990f 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -121,7 +121,7 @@ class FanOutOnWriteService < BaseService antennas = Antenna.available_stls antennas = antennas.where(account_id: Account.without_suspended.joins(:user).select('accounts.id').where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago)) - antennas = antennas.where(account: @account.followers).where.not(list_id: 0) if !@account.domain.nil? || [:public, :public_unlisted].exclude?(@status.visibility.to_sym) + antennas = antennas.where(account: @account.followers).or(antennas.where(account: @account)).where.not(list_id: 0) if !@account.domain.nil? || [:public, :public_unlisted].exclude?(@status.visibility.to_sym) collection = AntennaCollection.new(@status, @options[:update])