Aggio App

This commit is contained in:
Surya Paolo
2022-12-09 03:09:08 +01:00
parent 6966bfe47b
commit f963321d44
3 changed files with 9 additions and 4 deletions

View File

@@ -354,6 +354,7 @@ module.exports = {
let numrec = 0;
let nummsgsent = 0;
let text = '';
if (invia) {
@@ -367,6 +368,7 @@ module.exports = {
},
).lean();
for (const user of arrusers) {
const mytitle = await tools.convertSpecialTags(user, params.title);
@@ -390,8 +392,9 @@ module.exports = {
if (tools.isBitActive(params.typesend, shared_consts.TypeSend.TELEGRAM)) {
const telegid = user.profile.teleg_id;
text = tools.getContentNotifByParams(params, mycontent, shared_consts.TypeSend.TELEGRAM);
if (telegid > 0) {
risult = await telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, tools.getContentNotifByParams(params, mycontent, shared_consts.TypeSend.TELEGRAM));
risult = await telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, text);
await tools.snooze(50);
textsent = risult.text;
@@ -418,6 +421,7 @@ module.exports = {
numrec,
nummsgsent,
textsent,
text,
};
} catch (e) {
console.error('SendMsgToParam', e);