|
|
@ -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,9 +55,13 @@ 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'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|