Fix: #304 rubocop:disable Style/OptionalBooleanParameter (#310)

This commit is contained in:
S.H 2023-11-28 21:27:55 +09:00 committed by GitHub
parent 6dd40ad7cd
commit d18b233239
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 13 deletions

View file

@ -56,7 +56,7 @@ class DeliveryAntennaService
antennas = antennas.where(ignore_reblog: false) if @status.reblog?
antennas = antennas.where(stl: false, ltl: false)
collection = AntennaCollection.new(@status, @update, false)
collection = AntennaCollection.new(@status, @update)
content = extract_status_plain_text_with_spoiler_text(@status)
antennas.in_batches do |ans|
@ -89,7 +89,7 @@ class DeliveryAntennaService
antennas = antennas.where(account: @account.followers).or(antennas.where(account: @account)).where('insert_feeds IS FALSE OR list_id > 0') if home_post && !@status.limited_visibility?
antennas = antennas.where(account: @status.mentioned_accounts).or(antennas.where(account: @account)).where('insert_feeds IS FALSE OR list_id > 0') if @status.limited_visibility?
collection = AntennaCollection.new(@status, @update, home_post)
collection = AntennaCollection.new(@status, @update, stl_home: home_post)
antennas.in_batches do |ans|
ans.each do |antenna|
@ -111,7 +111,7 @@ class DeliveryAntennaService
antennas = Antenna.available_ltls
antennas = antennas.where(account_id: Account.without_suspended.joins(:user).select('accounts.id').where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago))
collection = AntennaCollection.new(@status, @update, false)
collection = AntennaCollection.new(@status, @update)
antennas.in_batches do |ans|
ans.each do |antenna|
@ -140,7 +140,7 @@ class DeliveryAntennaService
end
class AntennaCollection
def initialize(status, update, stl_home = false) # rubocop:disable Style/OptionalBooleanParameter
def initialize(status, update, stl_home: false)
@status = status
@update = update
@stl_home = stl_home