mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
closes #3593
This commit is contained in:
@@ -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);
|
||||
next(err, teaser[0]);
|
||||
});
|
||||
}, function(err) {
|
||||
next(err, teasers);
|
||||
});
|
||||
}, next);
|
||||
}
|
||||
}, function(err, results) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user