...
This commit is contained in:
@@ -1249,9 +1249,9 @@ router.post('/mgt', authenticate, async (req, res) => {
|
||||
locale = req.body.locale;
|
||||
|
||||
try {
|
||||
const {nummsgsent, numrec} = await telegrambot.sendMsgFromSiteToBotTelegram(idapp, req.user, mydata);
|
||||
const {nummsgsent, numrec, textsent} = await telegrambot.sendMsgFromSiteToBotTelegram(idapp, req.user, mydata);
|
||||
|
||||
return res.send({numrec, nummsgsent});
|
||||
return res.send({numrec, nummsgsent, textsent});
|
||||
|
||||
} catch (e) {
|
||||
res.status(400).send();
|
||||
|
||||
@@ -287,6 +287,8 @@ module.exports = {
|
||||
try {
|
||||
console.log('SendMsgToParam', params.typesend);
|
||||
|
||||
let textsent = '';
|
||||
|
||||
const telegrambot = require('../telegram/telegrambot');
|
||||
|
||||
if (params.typesend === 0)
|
||||
@@ -391,6 +393,8 @@ module.exports = {
|
||||
if (telegid > 0) {
|
||||
risult = await telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, tools.getContentNotifByParams(params, mycontent, shared_consts.TypeSend.TELEGRAM));
|
||||
await tools.snooze(50);
|
||||
|
||||
textsent = risult.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -413,6 +417,7 @@ module.exports = {
|
||||
return {
|
||||
numrec,
|
||||
nummsgsent,
|
||||
textsent,
|
||||
};
|
||||
} catch (e) {
|
||||
console.error('SendMsgToParam', e);
|
||||
|
||||
Reference in New Issue
Block a user