News post emails
This commit is contained in:
@@ -40,13 +40,17 @@ userDB = (DB) => {
|
||||
DB.getProfile = async (profileId) => {
|
||||
//if (userProfileCache[profileId] && !userProfileCache[profileId].isGroup) return userProfileCache[profileId];
|
||||
if(!profileId) return false;
|
||||
const _id = DB.ObjectID(profileId);
|
||||
let r = await DB.profileCols.findOne({ _id }).catch((err) => {
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
if (r) userProfileCache[profileId] = r;
|
||||
return r;
|
||||
try{
|
||||
const _id = DB.ObjectID(profileId);
|
||||
let r = await DB.profileCols.findOne({ _id }).catch((err) => {
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
if (r) userProfileCache[profileId] = r;
|
||||
return r;
|
||||
}catch(_){
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
DB.getPopularProfiles = async (limit = 10) => {
|
||||
|
||||
Reference in New Issue
Block a user