feat: gateway
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"tg-mc/conf"
|
||||
"tg-mc/defs"
|
||||
"tg-mc/models"
|
||||
"tg-mc/services/gateway"
|
||||
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -15,6 +16,8 @@ func RejectHandler(update tgbotapi.Update, cmd defs.Command) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
gateway.GetAuthcator().Reject(u)
|
||||
|
||||
callback := tgbotapi.NewCallback(update.CallbackQuery.ID, "已拒绝")
|
||||
if _, err := conf.Bot.Request(callback); err != nil {
|
||||
logrus.Panic(err)
|
||||
|
||||
Reference in New Issue
Block a user