From 533610e0c17f60326ea8f71d96b285fca8321e48 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Tue, 24 Oct 2023 21:59:18 -0400 Subject: [PATCH] Improve feed recomendations --- dbTools/post.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dbTools/post.js b/dbTools/post.js index 3f033e2..a17a389 100644 --- a/dbTools/post.js +++ b/dbTools/post.js @@ -206,14 +206,13 @@ postDB = (DB)=>{ const profile = await DB.getProfile(profileId); if(!profile) return []; let ids = profile.following.map((id)=>DB.ObjectID(id)); - ids.push(DB.ObjectID(profileId)) query = { $or: [ {profileid: { $in: ids }}, {toProfile: { - $in: ids + $in: [...ids, DB.ObjectID(profileId)] }} ], nonOrganicType: null // Exlcude news