mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
cache non-existing UUIDs, fixes #93
This commit is contained in:
parent
7ca7006736
commit
3fdd942c0f
@ -146,7 +146,15 @@ function store_images(rid, userId, details, type, callback) {
|
|||||||
currently_running.push(new_hash);
|
currently_running.push(new_hash);
|
||||||
networking.get_profile(rid, (is_uuid ? userId : null), function(err, profile) {
|
networking.get_profile(rid, (is_uuid ? userId : null), function(err, profile) {
|
||||||
if (err || (is_uuid && !profile)) {
|
if (err || (is_uuid && !profile)) {
|
||||||
callback_for(userId, type, err, null);
|
if (!err && !profile) {
|
||||||
|
cache.save_hash(rid, userId, null, null, function(cache_err) {
|
||||||
|
// we have no profile, so we have neither skin nor cape
|
||||||
|
callback_for(userId, "skin", cache_err, null);
|
||||||
|
callback_for(userId, "cape", cache_err, null);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
callback_for(userId, type, err, null);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
store_skin(rid, userId, profile, details, function(err, skin_hash) {
|
store_skin(rid, userId, profile, details, function(err, skin_hash) {
|
||||||
cache.save_hash(rid, userId, skin_hash, null, function(cache_err) {
|
cache.save_hash(rid, userId, skin_hash, null, function(cache_err) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user