Improve feed recomendations
This commit is contained in:
@@ -206,14 +206,13 @@ postDB = (DB)=>{
|
|||||||
const profile = await DB.getProfile(profileId);
|
const profile = await DB.getProfile(profileId);
|
||||||
if(!profile) return [];
|
if(!profile) return [];
|
||||||
let ids = profile.following.map((id)=>DB.ObjectID(id));
|
let ids = profile.following.map((id)=>DB.ObjectID(id));
|
||||||
ids.push(DB.ObjectID(profileId))
|
|
||||||
query = {
|
query = {
|
||||||
$or: [
|
$or: [
|
||||||
{profileid: {
|
{profileid: {
|
||||||
$in: ids
|
$in: ids
|
||||||
}},
|
}},
|
||||||
{toProfile: {
|
{toProfile: {
|
||||||
$in: ids
|
$in: [...ids, DB.ObjectID(profileId)]
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
nonOrganicType: null // Exlcude news
|
nonOrganicType: null // Exlcude news
|
||||||
|
|||||||
Reference in New Issue
Block a user