From 0f2ba7af445397ac66d4d322c856a0fee4306716 Mon Sep 17 00:00:00 2001 From: maximo tejeda Date: Sun, 23 Feb 2025 09:54:49 -0400 Subject: [PATCH] ADD use of internal keyboard creation --- internal/application/helpers/auth.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/internal/application/helpers/auth.go b/internal/application/helpers/auth.go index 309a6b0..ef9a7ce 100644 --- a/internal/application/helpers/auth.go +++ b/internal/application/helpers/auth.go @@ -186,17 +186,13 @@ ChatID: %d } bn, _ := b.GetMe(context.Background()) - kbd := &models.InlineKeyboardMarkup{ - InlineKeyboard: [][]models.InlineKeyboardButton{ - { - {Text: "Grant", CallbackData: fmt.Sprintf("operation=grant&userID=%d&bot=%s", up.ID, bn.Username)}, - {Text: "Deny", CallbackData: fmt.Sprintf("operation=deny&userID=%d&bot=%s", up.ID, bn.Username)}, - }, - { - {Text: "Ignore", CallbackData: fmt.Sprintf("operation=ignore&userID=%d&bot=%s", up.ID, bn.Username)}, - }, - }, + options := [][]string{ + {"Grant", fmt.Sprintf("operation=grant&userID=%d&bot=%s", up.ID, bn.Username)}, + {"Deny", fmt.Sprintf("operation=deny&userID=%d&bot=%s", up.ID, bn.Username)}, +// {"Deny", fmt.Sprintf("operation=ignore&userID=%d&bot=%s", up.ID, bn.Username)}, } + kbd := KeyboardWithCancel(options, 2, false) + msg.ReplyMarkup = kbd return msg }