fix(account): seed a fresh guest's interface language from the client locale
A guest was provisioned with only its detected time zone; its PreferredLanguage fell to the 'en' column default. The client already sends its locale in the guest login (GuestLoginRequest.locale), but the gateway dropped it and ProvisionGuest took no language — so a Russian user's brand-new native guest got English language-dependent server content (the ad banner, bot messages) until the client's later language reconcile. Read the locale in the gateway guest handler, thread it through GuestAuth -> ProvisionGuest, and seed PreferredLanguage from it (validated; an unsupported/absent value keeps the 'en' default). Wire field already present — no schema change.
This commit is contained in:
@@ -154,7 +154,7 @@ func provisionAccount(t *testing.T) uuid.UUID {
|
||||
// provisionGuest creates a fresh ephemeral guest account and returns its id.
|
||||
func provisionGuest(t *testing.T) uuid.UUID {
|
||||
t.Helper()
|
||||
acc, err := account.NewStore(testDB).ProvisionGuest(context.Background(), "")
|
||||
acc, err := account.NewStore(testDB).ProvisionGuest(context.Background(), "", "")
|
||||
if err != nil {
|
||||
t.Fatalf("provision guest: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user