- catalogo

- corretto logica del RefreshToken che non richiedeva il nuovo token, quindi scadeva tutte le volte, richiedendo sempre l'accesso !
This commit is contained in:
Surya Paolo
2025-01-07 16:50:55 +01:00
parent 7f6ed73763
commit 9fb7df56e6
24 changed files with 1199 additions and 59 deletions

View File

@@ -1009,6 +1009,44 @@ const MyTelegramBot = {
]);
send_notif = true;
}
} else if (myfunc === shared_consts.CallFunz.RICHIESTA_CIRCUIT) {
if (groupname) {
msg_notifpush = i18n.__({ phrase: 'CIRCUIT_ACCEPT_NEWENTRY_BYGROUP_CIRC', locale: langdest }, groupname);
domanda = i18n.__({ phrase: 'CIRCUIT_ACCEPT_NEWENTRY_BYGROUP_CIRC', locale: langdest }, groupname) + '<br>' + struserinfomsg;
keyb = cl.getInlineKeyboard(myuser.lang, [
{
text: '✅ Fai entrare a ' + groupname,
callback_data: InlineConferma.RISPOSTA_SI + myfunc + tools.SEP + myuser.username + tools.SEP + '' + tools.SEP + '' + tools.SEP +
groupid + tools.SEP + groupname,
},
/*{
text: '🚫 Rifiuta ' + groupname,
callback_data: InlineConferma.RISPOSTA_NO + myfunc + tools.SEP + myuser.username + tools.SEP + '' + tools.SEP + '' + tools.SEP +
groupid + tools.SEP + groupname,
},*/
]);
send_notif = true;
} else {
msg_notifpush = i18n.__({ phrase: 'CIRCUIT_ACCEPT_NEWENTRY_CIRC', locale: langdest }, myuser.username, name);
domanda = i18n.__({ phrase: 'CIRCUIT_ACCEPT_NEWENTRY_CIRC', locale: langdest }, myuser.username, name) + '<br>' + struserinfomsg;
keyb = cl.getInlineKeyboard(myuser.lang, [
{
text: '✅ Fai entrare a ' + myuser.username,
callback_data: InlineConferma.RISPOSTA_SI + myfunc + tools.SEP + myuser.username + tools.SEP + '' + tools.SEP + '' + tools.SEP +
groupid,
},
/*{
text: '🚫 Rifiuta ' + myuser.username,
callback_data: InlineConferma.RISPOSTA_NO + myfunc + tools.SEP + myuser.username + tools.SEP + '' + tools.SEP + '' + tools.SEP +
groupid,
}, */
]);
send_notif = true;
}
}
// Invia Msg
@@ -4603,10 +4641,15 @@ if (true) {
} else if (data.action === InlineConferma.RISPOSTA_SI + shared_consts.CallFunz.RICHIESTA_FIDO) {
if (circuit) {
cmd = shared_consts.CIRCUITCMD.SETFIDO;
// Aggiungilo nel Circuito
// await User.setCircuitCmd(user.idapp, data.username, circuit.name, cmd, 0, username_action, { groupname: data.groupname });
// Abiglitagli il Fido
cmd = shared_consts.CIRCUITCMD.SETFIDO;
await User.setCircuitCmd(user.idapp, data.username, circuit.name, cmd, 0, username_action, { groupname: data.groupname });
}
} else if (data.action === InlineConferma.RISPOSTA_SI + shared_consts.CallFunz.RICHIESTA_CIRCUIT) {
if (circuit) {
// Aggiungilo nel Circuito
cmd = shared_consts.CIRCUITCMD.SET;
await User.setCircuitCmd(user.idapp, data.username, circuit.name, cmd, 0, username_action, { groupname: data.groupname });
}
} else if (data.action === InlineConferma.RISPOSTA_NO + shared_consts.CallFunz.RICHIESTA_CIRCUIT) {