From 99d18322b28ecfd660d74b6fd1ca4f237b871c10 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Tue, 3 Sep 2024 15:34:19 +0300 Subject: [PATCH] Append to the correct flag set/reset --- internal/handlers/ussd/menuhandler.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index 912bd17..6ed2c4e 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -219,13 +219,13 @@ func (h *Handlers) SetResetSingleEdit(ctx context.Context, sym string, input []b switch menuOption { case "2": - res.FlagReset = append(res.FlagSet, flags["flag_allow_update"]) + res.FlagReset = append(res.FlagReset, flags["flag_allow_update"]) res.FlagSet = append(res.FlagSet, flags["flag_single_edit"]) case "3": - res.FlagReset = append(res.FlagSet, flags["flag_allow_update"]) + res.FlagReset = append(res.FlagReset, flags["flag_allow_update"]) res.FlagSet = append(res.FlagSet, flags["flag_single_edit"]) case "4": - res.FlagReset = append(res.FlagSet, flags["flag_allow_update"]) + res.FlagReset = append(res.FlagReset, flags["flag_allow_update"]) res.FlagSet = append(res.FlagSet, flags["flag_single_edit"]) default: res.FlagReset = append(res.FlagReset, flags["flag_single_edit"]) @@ -489,8 +489,8 @@ func (h *Handlers) CheckAccountStatus(ctx context.Context, sym string, input []b res.FlagSet = append(res.FlagSet, flags["flag_account_success"]) res.FlagReset = append(res.FlagReset, flags["flag_account_pending"]) } else { - res.FlagReset = append(res.FlagSet, flags["flag_account_success"]) - res.FlagSet = append(res.FlagReset, flags["flag_account_pending"]) + res.FlagReset = append(res.FlagReset, flags["flag_account_success"]) + res.FlagSet = append(res.FlagSet, flags["flag_account_pending"]) } return res, nil }