v1.18.x
psychobunny 9 years ago
parent 2d0224d42a
commit ff83305c6a

@ -255,20 +255,16 @@ var db = require('./database'),
user.getMultipleUserFields(uids, ['uid', 'username', 'picture', 'status'] , next);
},
teasers: function(next) {
var teasers = [];
async.each(uids, function(fromuid, next) {
async.map(uids, function(fromuid, next) {
Messaging.getMessages({
fromuid: fromuid,
touid: uid,
isNew: false,
count: 1
}, function(err, teaser) {
teasers[uids.indexOf(fromuid)] = teaser[0];
next(err);
});
}, function(err) {
next(err, teasers);
next(err, teaser[0]);
});
}, next);
}
}, function(err, results) {
if (err) {

Loading…
Cancel
Save