Отговорът трябва да бъде нещо подобно:
db.collection('messages', function (err, collection) {
collection.find(
{
$or : [
{$and: [{
receiver: new BSON.ObjectID(req.user._id)
}, {
sender: new BSON.ObjectID(req.body.sender)
}]},
{$and: [{
receiver: new BSON.ObjectID(req.body.sender)
}, {
sender: new BSON.ObjectID(req.user._id)
}]},
]
}
).sort({
date: -1
}).toArray(function (err, docs) {
console.log(docs);
})
});