mirror of https://github.com/tootsuite/mastodon
Fix `Style/RedundantParentheses` cop (#28176)
parent
5631f139c1
commit
3bc437b99a
|
@ -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(*)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue