fix following to be string id"
This commit is contained in:
@@ -134,10 +134,10 @@ postDB = (DB)=>{
|
|||||||
filteredPosts.push(p);
|
filteredPosts.push(p);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(isPostingAPrivateGroup && !following[p.profileid + ""]){
|
if(isPostingAPrivateGroup && !following[p.profileid]){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(isPostingToAPrivateGroup && !following[p.toProfile + ""]){
|
if(isPostingToAPrivateGroup && !following[p.toProfile]){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
filteredPosts.push(p);
|
filteredPosts.push(p);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ userDB = (DB) => {
|
|||||||
const _id = DB.ObjectID(profileId);
|
const _id = DB.ObjectID(profileId);
|
||||||
let update = {
|
let update = {
|
||||||
$addToSet:{
|
$addToSet:{
|
||||||
following: followProfileId
|
following: followProfileId + '' //converts to str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
|
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
|
||||||
@@ -103,7 +103,7 @@ userDB = (DB) => {
|
|||||||
const _id = DB.ObjectID(profileId);
|
const _id = DB.ObjectID(profileId);
|
||||||
let update = {
|
let update = {
|
||||||
$pull:{
|
$pull:{
|
||||||
following: followProfileId
|
following: followProfileId + '' //converts to str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
|
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user