Fix: allow to leave a ticket for admins

This commit is contained in:
akulij 2024-08-13 03:27:16 +03:00
parent fde3cd849e
commit 8072e8d218

View File

@ -184,7 +184,7 @@ func ProcessUpdate(bc BotController, update tgbotapi.Update) {
log.Printf("Set role bitmask (%b) for user: %d", user.RoleBitmask, user.ID) log.Printf("Set role bitmask (%b) for user: %d", user.RoleBitmask, user.ID)
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "Simulating user experience!") msg := tgbotapi.NewMessage(update.Message.Chat.ID, "Simulating user experience!")
bc.bot.Send(msg) bc.bot.Send(msg)
} else if user.IsEffectiveAdmin() { } else if user.IsEffectiveAdmin() && user.State != "leaveticket" {
if user.State != "start" { if user.State != "start" {
if strings.HasPrefix(user.State, "imgset:") { if strings.HasPrefix(user.State, "imgset:") {
Literal := strings.Split(user.State, ":")[1] Literal := strings.Split(user.State, ":")[1]