From 00c0445eed5e0e437907d90d125702194fbf2c92 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Thu, 28 Nov 2024 11:28:00 +0300 Subject: [PATCH] show name without depending on family name being set --- internal/handlers/ussd/menuhandler.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index a0b7bd1..dfd046d 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -1391,10 +1391,14 @@ func (h *Handlers) GetProfileInfo(ctx context.Context, sym string, input []byte) // Construct the full name name := defaultValue if familyName != defaultValue { - if firstName == defaultValue { - name = familyName - } else { + if firstName != defaultValue { name = firstName + " " + familyName + } else { + name = familyName + } + } else { + if firstName != defaultValue { + name = firstName } }