From 77ed03e56a9cce4564ca3daeca0f74e648f9b5a3 Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sun, 4 Mar 2018 22:03:14 -0500 Subject: [PATCH] no message --- models/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/profile.js b/models/profile.js index 5c1a717..e538920 100644 --- a/models/profile.js +++ b/models/profile.js @@ -173,7 +173,7 @@ module.exports = { .select('messages') .populate({ path: 'messages', - match: { image: { $exists: true }, text: { $exists: false } }, + match: { $and: [{ isUser: true }, { image: { $exists: true }, text: { $exists: false } }] }, select: 'image -_id' }) .exec((err, result) => {