Browse Source

fix: truncate pictureUrl if too long (#1311)

pull/1365/head
NGPixel 4 years ago
parent
commit
4698afdaeb
1 changed files with 4 additions and 1 deletions
  1. 5
      server/models/users.js

5
server/models/users.js

@ -204,7 +204,10 @@ module.exports = class User extends Model {
}
// Parse picture URL
let pictureUrl = _.get(profile, 'picture', _.get(user, 'pictureUrl', null))
let pictureUrl = _.truncate(_.get(profile, 'picture', _.get(user, 'pictureUrl', null)), {
length: 255,
omission: ''
})
// Update existing user
if (user) {

Loading…
Cancel
Save