another eachSeries gone horray

v1.18.x
Baris Soner Usakli 11 years ago
parent c560f8fb75
commit a813b3639e

@ -54,8 +54,6 @@ var db = require('./database'),
return callback(err, null);
}
var messages = [];
userData[0].uid = touid;
userData[1].uid = fromuid;
@ -67,19 +65,12 @@ var db = require('./database'),
Messaging.parse(message.content, message.fromuid, fromuid, userData[1], userData[0], false, function(result) {
message.content = result;
messages.push(message);
next(null);
next(null, message);
});
});
}
async.eachSeries(mids, getMessage, function(err) {
if (err) {
return callback(err, null);
}
callback(null, messages);
});
async.map(mids, getMessage, callback);
});
});
};

Loading…
Cancel
Save