Fix `Style/RedundantParentheses` cop (#28176)

pull/28177/head
Matt Jankowski 2023-12-01 11:00:44 -05:00 committed by GitHub
parent 5631f139c1
commit 3bc437b99a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ class Api::BaseController < ApplicationController
end
def doorkeeper_unauthorized_render_options(error: nil)
{ json: { error: (error.try(:description) || 'Not authorized') } }
{ json: { error: error.try(:description) || 'Not authorized' } }
end
def doorkeeper_forbidden_render_options(*)

View File

@ -421,7 +421,7 @@ class FeedManager
check_for_blocks.push(status.in_reply_to_account) if status.reply? && !status.in_reply_to_account_id.nil?
should_filter = blocks_or_mutes?(receiver_id, check_for_blocks, :mentions) # Filter if it's from someone I blocked, in reply to someone I blocked, or mentioning someone I blocked (or muted)
should_filter ||= (status.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.account_id).exists?) # of if the account is silenced and I'm not following them
should_filter ||= status.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.account_id).exists? # of if the account is silenced and I'm not following them
should_filter
end

View File

@ -48,8 +48,8 @@ module Mastodon::CLI
next if account.avatar.blank? && account.header.blank?
next if options[:remove_headers] && account.header.blank?
size = (account.header_file_size || 0)
size += (account.avatar_file_size || 0) if options[:prune_profiles]
size = account.header_file_size || 0
size += account.avatar_file_size || 0 if options[:prune_profiles]
unless dry_run?
account.header.destroy