fix(gravatar): convert email to lower case before hashing for gravatar

Fixes #529
This commit is contained in:
Jason Dreyzehner 2016-10-18 18:26:02 -04:00
commit bc90a53ff8

View file

@ -12,9 +12,10 @@ angular.module('copayApp.directives')
email: '@' email: '@'
}, },
link: function(scope, el, attr) { link: function(scope, el, attr) {
scope.emailHash = md5.createHash(scope.email || ''); if(typeof scope.email === "string"){
scope.emailHash = md5.createHash(scope.email.toLowerCase() || '');
}
}, },
template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=mm">' template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=mm">'
} }
}); });