[tgbot] Fix messages split

This commit is contained in:
somebodywashere 2023-12-27 20:32:25 +03:00
parent 84fc262b80
commit 1b073685e7
7 changed files with 37 additions and 37 deletions

View file

@ -820,7 +820,7 @@ func (t *Tgbot) SendMsgToTgbot(chatId int64, msg string, replyMarkup ...telego.R
allMessages[lastIndex] += "\r\n\r\n" + message
}
}
if strings.TrimSpace(allMessages[lastIndex]) == "" {
if strings.TrimSpace(allMessages[len(allMessages)-1]) == "" {
allMessages = allMessages[:len(allMessages)-1]
}
} else {
@ -1430,7 +1430,7 @@ func (t *Tgbot) notifyExhausted() {
if len(exhaustedClients) > 0 {
output += t.I18nBot("tgbot.messages.disabled", "Disabled=="+strconv.Itoa(len(disabledClients)))
if len(disabledClients) > 0 {
output += t.I18nBot("tgbot.clients") + ":"
output += t.I18nBot("tgbot.clients") + ":\r\n"
for _, traffic := range disabledClients {
output += " " + traffic.Email
}