++ poter inviare un msg telegram ai appartenenti ai Circuiti RIS.
This commit is contained in:
@@ -275,6 +275,7 @@ const Menu = {
|
||||
MSG_SI_INVITATI_NO_7REQ_INVITATI: emoji.get('incoming_envelope') +
|
||||
'Inv e NO 7 Req',
|
||||
MSGSTAFF: emoji.get('incoming_envelope') + ' Invia a STAFF',
|
||||
MSGAPPARTIENE_CIRCUITI_RIS: 'Invia a Utenti dei Circuiti RIS',
|
||||
MSGPAOLO: emoji.get('incoming_envelope') + ' Invia a PAOLO',
|
||||
RESTART_SRV: emoji.get('incoming_envelope') + 'Restart-NodeJs',
|
||||
REBOOT_SRV: emoji.get('incoming_envelope') + 'Reboot-VPS!',
|
||||
@@ -471,6 +472,7 @@ const Destin = {
|
||||
PAOLO: 9,
|
||||
DOMANDA: 10,
|
||||
RISPOSTA: 11,
|
||||
APPARTIENE_CIRCUITO_RIS: 20,
|
||||
};
|
||||
|
||||
const StatusMSGALL = {
|
||||
@@ -2014,6 +2016,8 @@ class Telegram {
|
||||
await this.menumsgAll(msg);
|
||||
} else if (testo === Menu.MSGSTAFF) {
|
||||
await this.menumsgStaff(msg);
|
||||
} else if (testo === Menu.MSGAPPARTIENE_CIRCUITI_RIS) {
|
||||
await this.menumsgAppartieneCircuitiRis(msg);
|
||||
} else if (testo === Menu.MSGPAOLO) {
|
||||
await this.menumsgPaolo(msg);
|
||||
} else if (cmd1 === Menu.EXECSH) {
|
||||
@@ -2422,6 +2426,8 @@ class Telegram {
|
||||
return 'STAFF';
|
||||
else if (destin === Destin.PAOLO)
|
||||
return 'PAOLO';
|
||||
else if (destin === Destin.APPARTIENE_CIRCUITO_RIS)
|
||||
return 'APPARTIENE_CIRCUITO_RIS';
|
||||
else if (destin === Destin.NO_7_REQ)
|
||||
return 'No 7 Requisiti';
|
||||
else if (destin === Destin.NO_9_REQ)
|
||||
@@ -2453,6 +2459,10 @@ class Telegram {
|
||||
await this.menumsgGenerico(msg, Destin.STAFF);
|
||||
}
|
||||
|
||||
async menumsgAppartieneCircuitiRis(msg) {
|
||||
await this.menumsgGenerico(msg, Destin.APPARTIENE_CIRCUITO_RIS);
|
||||
}
|
||||
|
||||
async menumsgPaolo(msg) {
|
||||
await this.menumsgGenerico(msg, Destin.PAOLO);
|
||||
}
|
||||
@@ -2971,6 +2981,8 @@ class Telegram {
|
||||
// NOTHING
|
||||
} else {
|
||||
|
||||
let contanumutenti = 0;
|
||||
|
||||
let usersall = null;
|
||||
|
||||
let myusername = '';
|
||||
@@ -3012,6 +3024,7 @@ class Telegram {
|
||||
|
||||
// TEST usersall = await User.getUsersTelegALL(rec.user.idapp, 'paoloar77');
|
||||
|
||||
|
||||
for (const utente of usersall) {
|
||||
|
||||
let FormDaMostrare = null;
|
||||
@@ -3029,6 +3042,8 @@ class Telegram {
|
||||
let invia = false;
|
||||
if (destin === Destin.STAFF) {
|
||||
invia = User.isManager(utente.perm);
|
||||
} else if (destin === Destin.APPARTIENE_CIRCUITO_RIS) {
|
||||
invia = await User.ExistAtLeastOneCircuit(utente.idapp, utente.username);
|
||||
} else if (destin === Destin.TUTTI) {
|
||||
invia = true;
|
||||
} else if (destin === Destin.PAOLO) {
|
||||
@@ -3057,6 +3072,7 @@ class Telegram {
|
||||
preparatesto += utente.name + ' ' + utente.surname + '(' +
|
||||
utente.username + ')' + '\n';
|
||||
} else if (cmd === CONTA_SOLO) {
|
||||
contanumutenti++;
|
||||
// Niente
|
||||
} else if (cmd === CHEDI_SE_IMBARCARTI) {
|
||||
textdainviare = tools.gettranslate('VUOI_IMBARCARTI', lang);
|
||||
@@ -3123,7 +3139,7 @@ class Telegram {
|
||||
|
||||
let msgris = '';
|
||||
if (cmd === CONTA_SOLO) {
|
||||
msgris = nummsgsent + ' ' +
|
||||
msgris = contanumutenti + ' ' +
|
||||
getstr(this.getlang(msg), 'MSG_MSG_TOSENT');
|
||||
} else if (cmd === NOME_COGNOME) {
|
||||
msgris = nummsgsent + ' ' + 'Utenti';
|
||||
|
||||
Reference in New Issue
Block a user