Autofix Rubocop Style/IfUnlessModifier (#23697)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user