Autofix Rubocop Style/IfUnlessModifier (#23697)

This commit is contained in:
Nick Schonning
2023-02-18 06:37:47 -05:00
committed by GitHub
parent 9ab2a775c9
commit e2a3ebb271
40 changed files with 55 additions and 271 deletions

View File

@ -56,9 +56,7 @@ module Omniauthable
user = User.new(user_params_from_auth(email, auth))
begin
if /\A#{URI::DEFAULT_PARSER.make_regexp(%w(http https))}\z/.match?(auth.info.image)
user.account.avatar_remote_url = auth.info.image
end
user.account.avatar_remote_url = auth.info.image if /\A#{URI::DEFAULT_PARSER.make_regexp(%w(http https))}\z/.match?(auth.info.image)
rescue Mastodon::UnexpectedResponseError
user.account.avatar_remote_url = nil
end