Merge pull request #561 from bitjson/bug/gravatar-lowercase

fix(gravatar): convert email to lower case before hashing for gravatar
This commit is contained in:
Matias Alejo Garcia 2016-10-19 00:33:29 -03:00 committed by GitHub
commit b266a9b113

View file

@ -12,9 +12,10 @@ angular.module('copayApp.directives')
email: '@'
},
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">'
}
});