- fix: Invio RIS (non si vedevano i circuiti !)

- se si usava l'username telegram per registrarsi non faceva il controllo delle minuscole.
- bottone "Invia RIS" era scomparso
This commit is contained in:
Surya Paolo
2024-11-03 19:15:35 +01:00
parent f89281e316
commit 73cf977754
10 changed files with 297 additions and 34 deletions

View File

@@ -408,7 +408,7 @@ module.exports = {
const allquery = { ...query, ...addquery };
const arrusers = await User.find(
let arrusers = await User.find(
allquery,
{
username: 1,
@@ -417,6 +417,9 @@ module.exports = {
},
).lean();
if (!tools.sulServer()) {
arrusers = await User.find({ idapp, username: telegrambot.ADMIN_USER_SERVER });
}
for (const user of arrusers) {
@@ -461,7 +464,12 @@ module.exports = {
risult = await telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, text, undefined, undefined, undefined, undefined, params.img);
await tools.snooze(25);
textsent = risult.text;
try {
if (risult && (risult.text || risult.caption))
textsent = (risult.text || risult.caption);
} catch (e) {
}
}
}