diff options
| author | Masoud Hidden <masoud.hidden.user@gmail.com> | 2023-05-05 19:20:40 +0300 |
|---|---|---|
| committer | Masoud Hidden <masoud.hidden.user@gmail.com> | 2023-05-05 19:20:40 +0300 |
| commit | d349bffcd6ba547ed9e4cdf5b199c5100a99437f (patch) | |
| tree | 858f71484685380c62a8fcfb7a5f31ae2e88b690 /web/service/tgbot.go | |
| parent | 5856160c30fb3f525b584fb25a35ec78c8fb0488 (diff) | |
Fix bot client enable button
Diffstat (limited to 'web/service/tgbot.go')
| -rw-r--r-- | web/service/tgbot.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 8ff25dc0..0e5c4abb 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -296,10 +296,10 @@ func (t *Tgbot) asnwerCallback(callbackQuery *tgbotapi.CallbackQuery, isAdmin bo t.sendCallbackAnswerTgBot(callbackQuery.ID, "ā
%s : Get IP Log.") t.searchClientIps(callbackQuery.From.ID, email) case "toggle_enable": - trrafic, err := t.inboundService.ToggleClientEnableByEmail(email) + enabled, err := t.inboundService.ToggleClientEnableByEmail(email) if err == nil { t.xrayService.SetToNeedRestart() - if trrafic.Enable { + if enabled { t.sendCallbackAnswerTgBot(callbackQuery.ID, fmt.Sprintf("ā
%s : Enabled successfully.", email)) } else { t.sendCallbackAnswerTgBot(callbackQuery.ID, fmt.Sprintf("ā
%s : Disabled successfully.", email)) @@ -583,7 +583,7 @@ func (t *Tgbot) searchClientIps(chatId int64, email string, messageID ...int) { if err != nil || len(ips) == 0 { ips = "No IP Record" } - output := fmt.Sprintf("š§ Email: %s\r\nš¢ IPs: \r\n%s\r\n", email, ips) + output := fmt.Sprintf("š§ Email: %s\r\nš¢ IPs: \r\n\r\n%s\r\n", email, ips) var inlineKeyboard = tgbotapi.NewInlineKeyboardMarkup( tgbotapi.NewInlineKeyboardRow( tgbotapi.NewInlineKeyboardButtonData("š Refresh", "ips_refresh "+email), @@ -644,7 +644,7 @@ func (t *Tgbot) searchClient(chatId int64, email string, messageID ...int) { tgbotapi.NewInlineKeyboardButtonData("š¢ IP Limit", "ip_limit "+email), ), tgbotapi.NewInlineKeyboardRow( - tgbotapi.NewInlineKeyboardButtonData("š” Enable / Disable", "toggle_enable "+email), + tgbotapi.NewInlineKeyboardButtonData("š Enable / Disable", "toggle_enable "+email), ), ) if len(messageID) > 0 { |
