Notifiche - Tutti - non letti
This commit is contained in:
@@ -358,10 +358,13 @@ const UserSchema = new mongoose.Schema({
|
||||
date: {type: Date},
|
||||
}], // username
|
||||
|
||||
notifs: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
notifs: [
|
||||
{
|
||||
_id: false,
|
||||
dir: {type: Number},
|
||||
value: {type: Number},
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
;
|
||||
@@ -1350,7 +1353,7 @@ UserSchema.statics.getUserProfileByUsername = async function(
|
||||
verified_email: 1,
|
||||
verified_by_aportador: 1,
|
||||
'profile.nationality': 1,
|
||||
"profile.mygroups": 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.biografia': 1,
|
||||
'profile.teleg_id': 1,
|
||||
@@ -1384,7 +1387,7 @@ UserSchema.statics.getUserProfileByUsername = async function(
|
||||
verified_by_aportador: 1,
|
||||
notask_verif: 1,
|
||||
'profile.nationality': 1,
|
||||
"profile.mygroups": 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.biografia': 1,
|
||||
'profile.teleg_id': 1,
|
||||
@@ -1774,7 +1777,6 @@ UserSchema.statics.setGroupsCmd = async function(idapp, usernameOrig, groupnameD
|
||||
ris = await MyGroup.deleteGroup(idapp, usernameOrig, groupnameDest); // Rimuovo l'Amicizia da me
|
||||
console.log('ris', ris);
|
||||
|
||||
|
||||
} else if (cmd === shared_consts.GROUPSCMD.CANCEL_REQ_GROUP) {
|
||||
|
||||
ris = await MyGroup.removeReqGroup(idapp, usernameOrig, groupnameDest); // Rimuovo l'Amicizia da me
|
||||
@@ -1814,7 +1816,7 @@ function getWhatToShow(idapp, username) {
|
||||
verified_by_aportador: 1,
|
||||
notask_verif: 1,
|
||||
'profile.nationality': 1,
|
||||
"profile.mygroups": 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.biografia': 1,
|
||||
'profile.username_telegram': 1,
|
||||
@@ -2706,8 +2708,8 @@ UserSchema.statics.getUsersAutorizzare = async function(idapp) {
|
||||
const myfind = {
|
||||
idapp,
|
||||
$or: [{deleted: {$exists: false}}, {deleted: {$exists: true, $eq: false}}],
|
||||
'profile.teleg_id': { $gt: 0 },
|
||||
verified_by_aportador: { $exists: false },
|
||||
'profile.teleg_id': {$gt: 0},
|
||||
verified_by_aportador: {$exists: false},
|
||||
};
|
||||
|
||||
return User.count(myfind);
|
||||
|
||||
Reference in New Issue
Block a user