- "La Mia Lavagna" ora è visibile il numero di Invitati che hanno i requisiti, dei propri invitati.
- Sistemato la funzione di poter Donare un invitato a qualcun'altro. - Aggiornati testi sul BOT. Per Staff Admin: - Notifica sul BOT per ogni modifica dell'invitante o eliminazione di un invitato.
This commit is contained in:
@@ -35,6 +35,8 @@ const emo = {
|
||||
YELLOW_HEART: emoji.get('yellow_heart'),
|
||||
PURPLE_HEART: emoji.get('purple_heart'),
|
||||
GIFT_HEART: emoji.get('gift_heart'),
|
||||
ROBOT_FACE: emoji.get('robot_face'),
|
||||
ADMIN: emoji.get('information_desk_person'),
|
||||
};
|
||||
|
||||
function getemojibynumber(number) {
|
||||
@@ -101,15 +103,21 @@ const StatusMSGALL = {
|
||||
|
||||
const txt = {
|
||||
MSG_SCEGLI_MENU: emoji.get('dizzy') + ' Scegli una voce di menu:' + emoji.get('dizzy'),
|
||||
MSG_ASK_USERNAME_BO: 'Inserire lo username con cui ti sei registrato sul sito %s:',
|
||||
MSG_ASK_USERNAME_BO: 'Scrivi nel messaggio lo username o la email con cui ti sei registrato sul sito di %s:',
|
||||
MSG_ERRORE_USERNAME: 'Attenzione! Devi inserire solo lo username (20 caratteri massimo)',
|
||||
MSG_ERRORE_USERNAME_NOT_FOUND: 'Attenzione! Username non trovato in archivio. Verifica che sia corretto.',
|
||||
MSG_ERRORE_USERNAME_NOT_FOUND: 'Attenzione! Username o email non trovata in archivio.\nVerifica che sia corretta e riscrivila nuovamente.',
|
||||
MSG_ERRORE_USERNAME_ANNULLA: 'Inserimento Annullato. Riprovare',
|
||||
MSG_OPERAZ_ANNULLATA: 'Operazione Annullata',
|
||||
MSG_ERRORE_VERIFY_CODE_MAXLEN: 'Attenzione! Devi inserire solo il codice a 6 cifre',
|
||||
MSG_VERIFY_CODE: 'Ritorna sul sito cliccando qui %s, poi torna qui e scrivi il Codice di Autenticazione che vedrai visualizzato',
|
||||
MSG_ERR_VERIFY_CODE: 'Codice di Verifica Errato! Controllare sul Sito e reinserire il nuovo codice di 6 cifre.',
|
||||
MSG_VERIFY_OK: emoji.get('grinning') + ' Benvenuto %s. Sono il tuo BOT. Chiedi utilizzando il menu che trovi in basso.\nOra sei correttamente verificato!\nContinua la guida passo passo che trovi sul sito. Qui puoi ritornare per vedere La tua Lavagna in maniera rapida, senza passare dal sito.',
|
||||
MSG_VERIFY_CODE: 'Copia il codice di Autenticazione che troverai visualizzato sul sito %s, ed incollalo qui sotto',
|
||||
MSG_ERR_VERIFY_CODE: 'Codice di Verifica Errato! Controlla sul sito %s e riscrivi il nuovo codice di 6 cifre.',
|
||||
MSG_VERIFY_OK: emoji.get('grinning') + ' Benvenuto %s! Sono AYNI BOT, il tuo assistente virtuale.\n' +
|
||||
'Clicca nei menu qui sotto, per accedere alle mie funzioni.',
|
||||
|
||||
// ' - In "La tua Lavagna" puoi controllare se hai completato la lista dei requisiti per entrare in programmazione Bigliettera.\n' +
|
||||
// ' - in "Zoom (Conferenze) troverai le date dei prossimi Zoom da condividere con i tuoi invitati.\n' +
|
||||
// ' - in "Link da condividere" trovi i link ',
|
||||
|
||||
MSG_ERR_UNKNOWN_VERIFY_CODE: 'Errore durante il salvataggio sul Server. Riprovare piú tardi',
|
||||
MSG_EXIT_TELEGRAM: 'L\'account è stato ora scollegato da questo Telegram BOT.',
|
||||
MSG_APORTADOR_USER_REGISTERED: emo.FIRE + ' Si è appena Registrato "%s (n. %s)"\n(Invitato da %s)',
|
||||
@@ -167,7 +175,7 @@ module.exports = {
|
||||
|
||||
if (usersmanagers) {
|
||||
for (const rec of usersmanagers) {
|
||||
this.sendMsgTelegramByIdTelegram(idapp, rec.profile.teleg_id, text)
|
||||
this.sendMsgTelegramByIdTelegram(idapp, rec.profile.teleg_id, emo.ROBOT_FACE + '[BOT-STAFF]' +emo.ADMIN + ': ' + text)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,8 +326,10 @@ class Telegram {
|
||||
// mystr += `____________________________________________\n`;
|
||||
|
||||
if (rec.user) {
|
||||
mystr += tools.get__('BENVENUTO', msg) + ' ' + rec.user.name + ' (' + rec.user.username + ') ' + emo.DIZZY;
|
||||
mystr += '\n' + '\n' + this.getsymb(emo.ENVELOPE, rec.user.verified_email);
|
||||
mystr += tools.get__('BENVENUTO', msg) + ' ' + rec.user.name + ' (' + rec.user.username + ') ' + emo.DIZZY + '\n\n';
|
||||
mystr += tools.get__('INFO_LA_MIA_LAVAGNA', msg);
|
||||
|
||||
mystr += '\n' + this.getsymb(emo.ENVELOPE, rec.user.verified_email);
|
||||
mystr += rec.user.verified_email ? tools.get__('EMAIL_VERIF', msg) : tools.get__('EMAIL_NON_VERIF', msg);
|
||||
|
||||
mystr += '\n' + '\n' + this.getsymb(emo.EYES, rec.user.profile.saw_zoom_presentation) + tools.get__('ZOOM_PARTECIPATO', msg);
|
||||
@@ -353,6 +363,9 @@ class Telegram {
|
||||
}
|
||||
}
|
||||
|
||||
mystr += '\n' + printf(tools.get__('INFO_LAVAGNA_SITO', msg), tools.getHostByIdApp(this.idapp));
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (!!mystr)
|
||||
@@ -362,8 +375,9 @@ class Telegram {
|
||||
|
||||
async menuLinkCondividere(msg) {
|
||||
const rec = this.getRecInMem(msg);
|
||||
let mystr = '';
|
||||
if (rec.user) {
|
||||
const mystr = tools.getHostByIdApp(this.idapp) + '/signup/' + rec.user.username;
|
||||
mystr += printf(tools.get__('INFO_LINK_DA_CONDIVIDERE', msg), tools.getHostByIdApp(this.idapp) + '/signup/' + rec.user.username, tools.getlinkzoom(''));
|
||||
await this.sendMsg(msg.chat.id, mystr);
|
||||
}
|
||||
}
|
||||
@@ -391,7 +405,7 @@ class Telegram {
|
||||
|
||||
const nextzoom = await CalZoom.getNextZoom(this.idapp);
|
||||
|
||||
mystr += emo.STARS + 'Zoom in programma:' + emo.STARS + '\n\n';
|
||||
mystr += emo.STARS + tools.get__('ZOOM_CONFERENCE') + emo.STARS + '\n\n';
|
||||
|
||||
let index = 1;
|
||||
listazoom.forEach((evento) => {
|
||||
@@ -492,14 +506,17 @@ class Telegram {
|
||||
const text = msg.text;
|
||||
if (text.length < 20) {
|
||||
if (rec) {
|
||||
rec.username_bo = text;
|
||||
rec.username_bo = text.trim();
|
||||
|
||||
// Check if username exist
|
||||
const user = await
|
||||
User.findByUsername(this.idapp, rec.username_bo);
|
||||
const user = await User.findByUsername(this.idapp, rec.username_bo);
|
||||
if (!user) {
|
||||
await this.sendMsg(msg.from.id, txt.MSG_ERRORE_USERNAME_NOT_FOUND);
|
||||
rec.username_bo = '';
|
||||
rec.username_bo = text.toLowerCase().trim();
|
||||
const user = await User.findByEmail(this.idapp, rec.username_bo);
|
||||
if (!user) {
|
||||
await this.sendMsg(msg.from.id, txt.MSG_ERRORE_USERNAME_NOT_FOUND);
|
||||
rec.username_bo = '';
|
||||
}
|
||||
} else {
|
||||
rec.user = user;
|
||||
await
|
||||
@@ -556,7 +573,7 @@ class Telegram {
|
||||
if (rec.retry < 2) {
|
||||
rec.retry++;
|
||||
await
|
||||
this.sendMsg(msg.from.id, txt.MSG_ERR_VERIFY_CODE)
|
||||
this.sendMsg(msg.from.id, printf(txt.MSG_ERR_VERIFY_CODE, tools.getHostByIdApp(this.idapp)));
|
||||
} else {
|
||||
rec.status = Status.NONE;
|
||||
await
|
||||
@@ -675,8 +692,8 @@ class Telegram {
|
||||
await
|
||||
this.addUser(msg);
|
||||
|
||||
await
|
||||
this.sendMsg(msg.chat.id, getstr(msg.from.language_code, printf(txt.MSG_ASK_USERNAME_BO, tools.getHostByIdApp(this.idapp))));
|
||||
// await this.sendMsg(msg.chat.id, getstr(msg.from.language_code, printf(txt.MSG_ASK_USERNAME_BO, tools.getHostByIdApp(this.idapp))));
|
||||
await this.sendMsg(msg.chat.id, getstr(msg.from.language_code, printf(txt.MSG_ASK_USERNAME_BO, tools.getNomeAppByIdApp(this.idapp))));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user