mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Gravatar
This commit is contained in:
parent
e5ded48d14
commit
3328bcd9eb
14 changed files with 88 additions and 30 deletions
|
|
@ -7,6 +7,7 @@ function AbstractCacheStorage()
|
|||
{
|
||||
this.oEmailsPicsHashes = {};
|
||||
this.oServices = {};
|
||||
this.bAllowGravatar = !!RL.settingsGet('AllowGravatar');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -19,6 +20,11 @@ AbstractCacheStorage.prototype.oEmailsPicsHashes = {};
|
|||
*/
|
||||
AbstractCacheStorage.prototype.oServices = {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
AbstractCacheStorage.prototype.bAllowGravatar = false;
|
||||
|
||||
AbstractCacheStorage.prototype.clear = function ()
|
||||
{
|
||||
this.oServices = {};
|
||||
|
|
@ -51,14 +57,14 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
|
|||
}
|
||||
|
||||
|
||||
// if ('' === sUrl) // Gravatar // TODO
|
||||
// {
|
||||
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
if (this.bAllowGravatar && '' === sUrl)
|
||||
{
|
||||
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
|
||||
}
|
||||
else
|
||||
{
|
||||
fCallback(sUrl, sEmail);
|
||||
// }
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue