|
|
@ -1,4 +1,6 @@ |
|
|
|
/* global MD5 */ |
|
|
|
/* global Strophe, APP, MD5, config */ |
|
|
|
|
|
|
|
var Settings = require("../../settings/Settings"); |
|
|
|
|
|
|
|
|
|
|
|
var users = {}; |
|
|
|
var users = {}; |
|
|
|
|
|
|
|
|
|
|
|
var Avatar = { |
|
|
|
var Avatar = { |
|
|
@ -53,12 +55,16 @@ var Avatar = { |
|
|
|
); |
|
|
|
); |
|
|
|
email = id; |
|
|
|
email = id; |
|
|
|
} |
|
|
|
} |
|
|
|
return 'https://www.gravatar.com/avatar/' + |
|
|
|
if (config.enableThirdPartyRequests === true) { |
|
|
|
MD5.hexdigest(email.trim().toLowerCase()) + |
|
|
|
return 'https://www.gravatar.com/avatar/' + |
|
|
|
"?d=wavatar&size=" + (size || "30"); |
|
|
|
MD5.hexdigest(id.trim().toLowerCase()) + |
|
|
|
|
|
|
|
"?d=wavatar&size=" + (size || "30"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return 'images/avatar2.png'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = Avatar; |
|
|
|
module.exports = Avatar; |
|
|
|