diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-13 13:01:46 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-13 13:01:46 +0300 |
| commit | 2a182d8b9adbe762b2f3de7b4f127c79384b9a24 (patch) | |
| tree | 19d71ea7366f81550fd802cc836bfe7f5a7e293a /web | |
| parent | 77241c7fcf156b6ebee13bf58f4342aca16292e1 (diff) | |
[bug] fix login failure when tgbot is not active
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web')
| -rw-r--r-- | web/service/tgbot.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 5b12a229..108af567 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -381,6 +381,9 @@ func (t *Tgbot) SendAnswer(chatId int64, msg string, isAdmin bool) { } func (t *Tgbot) SendMsgToTgbot(tgid int64, msg string, inlineKeyboard ...tgbotapi.InlineKeyboardMarkup) { + if !isRunning { + return + } var allMessages []string limit := 2000 // paging message if it is big |
