diff --git a/index.html b/index.html index facee3d0e..8b134f2cc 100644 --- a/index.html +++ b/index.html @@ -201,7 +201,7 @@
- +
diff --git a/modules/UI/avatar/Avatar.js b/modules/UI/avatar/Avatar.js index 6ab1327e4..d59f494c7 100644 --- a/modules/UI/avatar/Avatar.js +++ b/modules/UI/avatar/Avatar.js @@ -1,4 +1,4 @@ -/* global Strophe, APP, MD5 */ +/* global Strophe, APP, MD5, config */ var Settings = require("../../settings/Settings"); var users = {}; @@ -57,12 +57,16 @@ var Avatar = { "No avatar stored yet for " + jid + " - using JID as ID"); id = jid; } - return 'https://www.gravatar.com/avatar/' + - MD5.hexdigest(id.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;