Use gravatar when enabled.
This commit is contained in:
parent
46a5c909c8
commit
fd9485b7e5
|
@ -202,7 +202,7 @@
|
|||
</div>
|
||||
<div id="settingsmenu" class="right-panel">
|
||||
<div class="icon-settings" data-i18n="settings.title"></div>
|
||||
<img id="avatar" src="https://www.gravatar.com/avatar/87291c37c25be69a072a4514931b1749?d=wavatar&size=30"/>
|
||||
<img id="avatar" src="images/avatar2.png"/>
|
||||
<div class="arrow-up"></div>
|
||||
<input type="text" id="setDisplayName" data-i18n="[placeholder]settings.name" placeholder="Name">
|
||||
<input type="text" id="setEmail" placeholder="E-Mail">
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* global MD5 */
|
||||
/* global Strophe, APP, MD5, config */
|
||||
var Settings = require("../../settings/Settings");
|
||||
|
||||
var users = {};
|
||||
|
||||
var Avatar = {
|
||||
|
@ -53,12 +55,16 @@ var Avatar = {
|
|||
);
|
||||
email = id;
|
||||
}
|
||||
return 'https://www.gravatar.com/avatar/' +
|
||||
MD5.hexdigest(email.trim().toLowerCase()) +
|
||||
"?d=wavatar&size=" + (size || "30");
|
||||
if (config.enableThirdPartyRequests === true) {
|
||||
return 'https://www.gravatar.com/avatar/' +
|
||||
MD5.hexdigest(id.trim().toLowerCase()) +
|
||||
"?d=wavatar&size=" + (size || "30");
|
||||
} else {
|
||||
return 'images/avatar2.png';
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
module.exports = Avatar;
|
||||
module.exports = Avatar;
|
||||
|
|
Loading…
Reference in New Issue