mirror of https://github.com/status-im/codimd.git
Merge pull request #550 from SISheogorath/fix/gitlabAvatar
Fix broken profile images in GitLab Fixes #549
This commit is contained in:
commit
a99cac0cf0
|
@ -104,8 +104,12 @@ module.exports = function (sequelize, DataTypes) {
|
|||
break
|
||||
case 'gitlab':
|
||||
photo = profile.avatarUrl
|
||||
if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400')
|
||||
else photo = photo.replace(/(\?s=)\d*$/i, '$196')
|
||||
if (photo) {
|
||||
if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400')
|
||||
else photo = photo.replace(/(\?s=)\d*$/i, '$196')
|
||||
} else {
|
||||
photo = letterAvatars(profile.username)
|
||||
}
|
||||
break
|
||||
case 'dropbox':
|
||||
// no image api provided, use gravatar
|
||||
|
|
Loading…
Reference in New Issue