mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
small changes
This commit is contained in:
@@ -941,7 +941,7 @@ func (s *InboundService) disableInvalidInbounds(tx *gorm.DB) (bool, int64, error
|
||||
s.xrayApi.Init(p.GetAPIPort())
|
||||
for _, tag := range tags {
|
||||
err1 := s.xrayApi.DelInbound(tag)
|
||||
if err == nil {
|
||||
if err1 == nil {
|
||||
logger.Debug("Inbound disabled by api:", tag)
|
||||
} else {
|
||||
logger.Debug("Error in disabling inbound by api:", err1)
|
||||
|
||||
@@ -132,7 +132,7 @@ func (t *Tgbot) OnReceive() {
|
||||
isAdmin := checkAdmin(tgId)
|
||||
if update.Message == nil {
|
||||
if update.CallbackQuery != nil {
|
||||
t.asnwerCallback(update.CallbackQuery, isAdmin)
|
||||
t.asnwerCallback(update.CallbackQuery)
|
||||
}
|
||||
} else {
|
||||
if update.Message.IsCommand() {
|
||||
@@ -193,7 +193,7 @@ func (t *Tgbot) answerCommand(message *tgbotapi.Message, chatId int64, isAdmin b
|
||||
t.SendAnswer(chatId, msg, isAdmin)
|
||||
}
|
||||
|
||||
func (t *Tgbot) asnwerCallback(callbackQuery *tgbotapi.CallbackQuery, isAdmin bool) {
|
||||
func (t *Tgbot) asnwerCallback(callbackQuery *tgbotapi.CallbackQuery) {
|
||||
// Respond to the callback query, telling Telegram to show the user
|
||||
// a message with the data received.
|
||||
callback := tgbotapi.NewCallback(callbackQuery.ID, callbackQuery.Data)
|
||||
|
||||
Reference in New Issue
Block a user