- add: poter inviare un messaggi a tutti i partecipanti dei Circuiti RIS (senza perdere la formattazione).
This commit is contained in:
@@ -275,7 +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',
|
||||
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!',
|
||||
@@ -3114,8 +3114,16 @@ class Telegram {
|
||||
// if (process.env.PROD === "0") {
|
||||
// telegid = 12429864;
|
||||
// }
|
||||
await this.sendMsg(telegid, textdainviare, null,
|
||||
FormDaMostrare);
|
||||
if (rec.forwardMessage && rec.chatId && rec.messageId) {
|
||||
|
||||
// Inoltra il messaggio alla stessa chat o ad un'altra
|
||||
this.bot.forwardMessage(rec.chatId, telegid, rec.messageId);
|
||||
|
||||
} else {
|
||||
|
||||
await this.sendMsg(telegid, textdainviare, null,
|
||||
FormDaMostrare);
|
||||
}
|
||||
|
||||
// break;
|
||||
}
|
||||
@@ -3170,6 +3178,7 @@ class Telegram {
|
||||
} else {
|
||||
if (msgris) {
|
||||
tools.writeEventsLog(msgris);
|
||||
|
||||
await this.sendMsg(msg.chat.id, msgris);
|
||||
}
|
||||
}
|
||||
@@ -3318,6 +3327,13 @@ class Telegram {
|
||||
} else if (rec.msgall_status === StatusMSGALL.ASK) {
|
||||
if (!this.isSelMenu(msg, msg.text, 'INDIETRO')) {
|
||||
rec.msgtosent = msg.text;
|
||||
rec.entities = msg.entities;
|
||||
|
||||
// Se contiene della formattazione allora fai il FORWARD DEL MESSAGGIO
|
||||
rec.forwardMessage = !!rec.entities;
|
||||
|
||||
rec.chatId = msg.chat.id;
|
||||
rec.messageId = msg.message_id;
|
||||
rec.msgall_status = StatusMSGALL.CONFIRM;
|
||||
const cmd = rec.msgtosent.toLowerCase();
|
||||
let achi = this.getDestinStr(msg, rec.msgall_achi, rec);
|
||||
@@ -3486,6 +3502,7 @@ class Telegram {
|
||||
msg_username_risposta: '',
|
||||
extraparam: '',
|
||||
msgtosent: '',
|
||||
entities: [],
|
||||
msgNo: '',
|
||||
msg_toDest_yes: '',
|
||||
msg_toDest_no: '',
|
||||
@@ -4078,14 +4095,22 @@ class Telegram {
|
||||
|
||||
const lang = this.getlang(msg);
|
||||
|
||||
this._inviaMsg(msg.from.id, domanda, {
|
||||
disable_web_page_preview: true,
|
||||
reply_markup: {
|
||||
resize_keyboard: true,
|
||||
one_time_keyboard: true,
|
||||
keyboard: this.getmenuKey(MenuYesNo, lang),
|
||||
},
|
||||
});
|
||||
if (msg.forwardMessage && msg.chatId && msg.messageId) {
|
||||
|
||||
// Inoltra il messaggio alla stessa chat o ad un'altra
|
||||
this.bot.forwardMessage(msg.chatId, msg.chatId, msg.messageId);
|
||||
|
||||
} else {
|
||||
this._inviaMsg(msg.from.id, domanda, {
|
||||
disable_web_page_preview: true,
|
||||
reply_markup: {
|
||||
resize_keyboard: true,
|
||||
one_time_keyboard: true,
|
||||
keyboard: this.getmenuKey(MenuYesNo, lang),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async ScegliLang(msg, lang) {
|
||||
|
||||
Reference in New Issue
Block a user