Improve feed recomendations

This commit is contained in:
Adolfo Reyna
2023-10-24 21:59:18 -04:00
parent bffe227ad4
commit 533610e0c1

View File

@@ -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