about summary refs log tree commit diff
path: root/app/models/concerns/omniauthable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/concerns/omniauthable.rb')
-rw-r--r--app/models/concerns/omniauthable.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/concerns/omniauthable.rb b/app/models/concerns/omniauthable.rb
index 7d54e9d6d..b0aa5be6f 100644
--- a/app/models/concerns/omniauthable.rb
+++ b/app/models/concerns/omniauthable.rb
@@ -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