Fix following groups
This commit is contained in:
@@ -286,13 +286,17 @@ userDB = (DB) => {
|
||||
}
|
||||
|
||||
DB.getFollowingGroups = async (profileid) => {
|
||||
const profile = await DB.getProfile(profileId);
|
||||
const profile = await DB.getProfile(profileid);
|
||||
let ids = [];
|
||||
for(id in profile.following){
|
||||
let oId = DB.ObjectID(id);
|
||||
let checkProfile = await DB.getProfileCache(oId)
|
||||
if(checkProfile && checkProfile.isGroup && !checkProfile.isChat){
|
||||
ids.push(oId)
|
||||
try{
|
||||
let oId = DB.ObjectID(profile.following[id]);
|
||||
let checkProfile = await DB.getProfileCache(oId)
|
||||
if(checkProfile && checkProfile.isGroup && !checkProfile.isChat){
|
||||
ids.push(oId)
|
||||
}
|
||||
}catch{
|
||||
|
||||
}
|
||||
}
|
||||
let query = {
|
||||
|
||||
Reference in New Issue
Block a user