Modifiche ultimate: Grafica Navi , Prenota un Altro Viaggio.

This commit is contained in:
Paolo Arena
2020-05-13 01:32:27 +02:00
parent db12375935
commit 0565339bab
8 changed files with 142 additions and 72 deletions

View File

@@ -500,7 +500,7 @@ module.exports = {
const usersmanagers = await User.getusersManagers(idapp);
if (usersmanagers) {
for (const rec of usersmanagers) {
await this.sendMsgTelegramByIdTelegram(idapp, rec.profile.teleg_id, emo.ROBOT_FACE + '[BOT-STAFF]' + emo.ADMIN + ': ' + text, undefined, undefined, true);
await this.sendMsgTelegramByIdTelegram(idapp, rec.profile.teleg_id, emo.ROBOT_FACE + ': ' + text, undefined, undefined, true);
await tools.snooze(200)
}
}
@@ -732,7 +732,7 @@ async function local_sendMsgTelegramToTheManagers(idapp, text, msg, username_bo)
if (username_bo)
username = username_bo;
text = emo.ROBOT_FACE + '[BOT-STAFF]' + emo.ADMIN + ': Da ' + msg.chat.first_name + ' ' + msg.chat.last_name + ' (' + username + '): \n' + text;
text = emo.ROBOT_FACE + ': Da ' + msg.chat.first_name + ' ' + msg.chat.last_name + ' (' + username + '): \n' + text;
tools.writeEventsLog(text);
if (usersmanagers) {
@@ -2145,7 +2145,14 @@ class Telegram {
async sendMsg(id, text, menu, form, msg_id, chat_id, ripr_menuPrec) {
return await this._inviaMsg(id, text, form, menu, msg_id, chat_id, ripr_menuPrec);
if (text.length > 4096) {
let text1 = text.slice(0, 4096);
let text2 = text.slice(4096, text.length);
await this._inviaMsg(id, text1, form, menu, msg_id, chat_id, ripr_menuPrec);
return await this._inviaMsg(id, text2, form, menu, msg_id, chat_id, ripr_menuPrec);
}else {
return await this._inviaMsg(id, text, form, menu, msg_id, chat_id, ripr_menuPrec);
}
}