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:
commit
b266a9b113
1 changed files with 3 additions and 2 deletions
|
|
@ -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">'
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue