feat: gateway
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
vaalacat
2024-04-23 11:18:16 +00:00
parent a42fecfc63
commit 75944abbc2
13 changed files with 404 additions and 87 deletions

View File

@@ -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)