Aggio App
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user