Skip to content

Commit d5decad

Browse files
committed
Setting the Twitter avatar to use the HTTPS url instead of a HTTP url.
1 parent cb059a5 commit d5decad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/models/user.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,11 @@ def thumbnail_url_for(oauth)
322322
if github = oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][:gravatar_id]
323323
"https://secure.gravatar.com/avatar/#{oauth[:extra][:raw_info][:gravatar_id]}"
324324
elsif oauth[:info]
325-
oauth[:info][:image]
325+
if oauth['provider'] == 'twitter'
326+
oauth[:extra][:raw_info][:profile_image_url_https]
327+
else
328+
oauth[:info][:image]
329+
end
326330
end
327331
end
328332

0 commit comments

Comments
 (0)