mirror of https://github.com/status-im/codimd.git
refactor: fix lint on lib/letter-avatars.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
parent
ac6a605cd9
commit
2c7459c16e
|
@ -32,9 +32,9 @@ exports.generateAvatarURL = function (name, email = '', big = true) {
|
||||||
}
|
}
|
||||||
name = encodeURIComponent(name)
|
name = encodeURIComponent(name)
|
||||||
|
|
||||||
let hash = crypto.createHash('md5')
|
const hash = crypto.createHash('md5')
|
||||||
hash.update(email.toLowerCase())
|
hash.update(email.toLowerCase())
|
||||||
let hexDigest = hash.digest('hex')
|
const hexDigest = hash.digest('hex')
|
||||||
|
|
||||||
if (email !== '' && config.allowGravatar) {
|
if (email !== '' && config.allowGravatar) {
|
||||||
photo = 'https://www.gravatar.com/avatar/' + hexDigest
|
photo = 'https://www.gravatar.com/avatar/' + hexDigest
|
||||||
|
|
Loading…
Reference in New Issue