Use gravatar when enabled.
This commit is contained in:
parent
3f42f8bf67
commit
895bb3fd60
|
@ -201,7 +201,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="settingsmenu" class="right-panel">
|
<div id="settingsmenu" class="right-panel">
|
||||||
<div class="icon-settings" data-i18n="settings.title"></div>
|
<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>
|
<div class="arrow-up"></div>
|
||||||
<input type="text" id="setDisplayName" data-i18n="[placeholder]settings.name" placeholder="Name">
|
<input type="text" id="setDisplayName" data-i18n="[placeholder]settings.name" placeholder="Name">
|
||||||
<input type="text" id="setEmail" placeholder="E-Mail">
|
<input type="text" id="setEmail" placeholder="E-Mail">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* global Strophe, APP, MD5 */
|
/* global Strophe, APP, MD5, config */
|
||||||
var Settings = require("../../settings/Settings");
|
var Settings = require("../../settings/Settings");
|
||||||
|
|
||||||
var users = {};
|
var users = {};
|
||||||
|
@ -57,9 +57,13 @@ var Avatar = {
|
||||||
"No avatar stored yet for " + jid + " - using JID as ID");
|
"No avatar stored yet for " + jid + " - using JID as ID");
|
||||||
id = jid;
|
id = jid;
|
||||||
}
|
}
|
||||||
|
if (config.enableThirdPartyRequests === true) {
|
||||||
return 'https://www.gravatar.com/avatar/' +
|
return 'https://www.gravatar.com/avatar/' +
|
||||||
MD5.hexdigest(id.trim().toLowerCase()) +
|
MD5.hexdigest(id.trim().toLowerCase()) +
|
||||||
"?d=wavatar&size=" + (size || "30");
|
"?d=wavatar&size=" + (size || "30");
|
||||||
|
} else {
|
||||||
|
return 'images/avatar2.png';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue