diff --git a/index.html b/index.html index 3fd0f663c..fc6dfdc39 100644 --- a/index.html +++ b/index.html @@ -202,7 +202,7 @@
- +
diff --git a/modules/UI/avatar/Avatar.js b/modules/UI/avatar/Avatar.js index a75d27be9..136cebc6e 100644 --- a/modules/UI/avatar/Avatar.js +++ b/modules/UI/avatar/Avatar.js @@ -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; \ No newline at end of file +module.exports = Avatar;