fix private groups visibility on feed and profiles
This commit is contained in:
@@ -21,14 +21,7 @@ DB.getDB.then((DB)=>{
|
||||
|
||||
router.get("/usr/:id", async (req, res) => {
|
||||
const profileId = req.params.id;
|
||||
if(await DB.isGroupPrivate(profileId)){
|
||||
let requestProfile = getProfileId(req) + "";
|
||||
let group = await DB.getProfileCache(profileId);
|
||||
if(!group.subscribed[requestProfile] && profileId != requestProfile){
|
||||
return res.json([]);
|
||||
}
|
||||
}
|
||||
const posts = await DB.getPosts(profileId);
|
||||
const posts = await DB.getPosts(profileId, getProfileId(req));
|
||||
return res.json(posts);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user