Aggiunte opzioni per il Gestore: richiede che l'invitante confermi la Reg, Notifica sul BOT , Notifica all'Admin la Reg.

This commit is contained in:
paoloar77
2022-02-27 16:56:02 +01:00
parent 2749506de7
commit 8d98726f1f
9 changed files with 175 additions and 85 deletions

View File

@@ -23,6 +23,8 @@ const { Newstosent } = require('./models/newstosent');
const server_constants = require('./tools/server_constants');
const { User } = require('./models/user');
const transport_preview = nodemailer.createTransport({
jsonTransport: true
});
@@ -203,9 +205,12 @@ module.exports = {
await telegrambot.notifyToTelegram(telegrambot.phase.REGISTRATION, mylocalsconf);
const nometot = tools.getNomeCognomeEUserNameByUser(mylocalsconf);
if (tools.getConfSiteOptionEnabledByIdApp(mylocalsconf.idapp, shared_consts.ConfSite.Notif_Reg_Push_Admin)) {
const nometot = tools.getNomeCognomeEUserNameByUser(mylocalsconf);
tools.sendNotifToAdmin('Nuova Registrazione Utente: ' + nometot);
const numutenti = await User.getNumUsers(mylocalsconf.idapp);
tools.sendNotifToAdmin('++ [' + numutenti + '] ' + nometot);
}
// if (tools.isManagAndAdminDifferent(idapp)) {
// this.sendEmail_base('admin/registration/' + tools.LANGADMIN, tools.getManagerEmailByIdApp(idapp), mylocalsconf, '');