alias-fqdn #9

Merged
lash merged 23 commits from alias-fqdn into master 2025-01-25 13:46:29 +01:00
Showing only changes of commit 6f0994d692 - Show all commits

View File

@ -1082,6 +1082,11 @@ func (h *MenuHandlers) GetProfileInfo(ctx context.Context, sym string, input []b
gender := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_GENDER)) gender := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_GENDER))
location := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_LOCATION)) location := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_LOCATION))
offerings := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_OFFERINGS)) offerings := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_OFFERINGS))
alias := getEntryOrDefault(store.ReadEntry(ctx, sessionId, storedb.DATA_ACCOUNT_ALIAS))
if alias != defaultValue {
alias = strings.Split(alias, ".")[0]
}
// Construct the full name // Construct the full name
name := person.ConstructName(firstName, familyName, defaultValue) name := person.ConstructName(firstName, familyName, defaultValue)
@ -1098,18 +1103,18 @@ func (h *MenuHandlers) GetProfileInfo(ctx context.Context, sym string, input []b
switch language.Code { switch language.Code {
case "eng": case "eng":
res.Content = fmt.Sprintf( res.Content = fmt.Sprintf(
"Name: %s\nGender: %s\nAge: %s\nLocation: %s\nYou provide: %s\n", "Name: %s\nGender: %s\nAge: %s\nLocation: %s\nYou provide: %s\nYour alias: %s\n",
name, gender, age, location, offerings, name, gender, age, location, offerings, alias,
) )
case "swa": case "swa":
res.Content = fmt.Sprintf( res.Content = fmt.Sprintf(
"Jina: %s\nJinsia: %s\nUmri: %s\nEneo: %s\nUnauza: %s\n", "Jina: %s\nJinsia: %s\nUmri: %s\nEneo: %s\nUnauza: %s\nLakabu yako: %s\n",
name, gender, age, location, offerings, name, gender, age, location, offerings, alias,
) )
default: default:
res.Content = fmt.Sprintf( res.Content = fmt.Sprintf(
"Name: %s\nGender: %s\nAge: %s\nLocation: %s\nYou provide: %s\n", "Name: %s\nGender: %s\nAge: %s\nLocation: %s\nYou provide: %s\nYour alias: %s\n",
name, gender, age, location, offerings, name, gender, age, location, offerings, alias,
) )
} }