Pagina con i link dei Canali territoriali di RISO

Lista Tabelle "Aggiungi" da errore userId...
Aggiunto "Servizi" e alcune sue sottocategorie
Aggiunto anche la conversione della foto piccola alla Foto Profilo
This commit is contained in:
paoloar77
2022-03-09 14:53:09 +01:00
parent 82e3ed7175
commit e79c22a038
13 changed files with 265 additions and 311 deletions

View File

@@ -222,6 +222,22 @@ module.exports = {
addquery = {username: params.usernameDest};
} else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_MYSELF) {
addquery = {username: params.usernameDest};
} else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_TELEG_NO_USERNAME_TELEG) {
addquery = {
'profile.teleg_id': {$gt: 1},
$or: [
{'profile.username_telegram': {$exists: false}},
{'profile.username_telegram': {$exists: true, $eq: ''}}],
};
} else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_TELEG_NO_VERIF_BY_APORTADOR) {
addquery = {
'profile.teleg_id': {$gt: 1},
'profile.username_telegram': {$exists: true},
$expr: { $gt: [ { $strLenCP: "$profile.username_telegram" }, 3 ] },
$or: [
{'verified_by_aportador': {$exists: false}},
{'verified_by_aportador': {$exists: true, $eq: false}}],
};
} else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_GROUP) {
if (params.groupnameDest) {
addquery = {
@@ -283,8 +299,8 @@ module.exports = {
nummsgsent++;
}
if ((nummsgsent % 100) === 0) {
console.log('Inviati ', nummsgsent, 'messaggi...')
if (nummsgsent > 0 && (nummsgsent % 100) === 0) {
console.log('Inviati ', nummsgsent, 'messaggi...');
}
}
}