force locale en-US (#3311)

This commit is contained in:
Neal Shah
2026-06-26 15:31:58 -04:00
committed by GitHub
parent 197ce6faff
commit d4a3224aa3
2 changed files with 5 additions and 2 deletions
@@ -79,8 +79,9 @@ describe('PreludeClient', () => {
expect(init.headers.Authorization).toBe('Bearer sk_test');
expect(JSON.parse(init.body)).toEqual({
target: { type: 'phone_number', value: '+14155550123' },
// Defaults to RCS (cheaper); Prelude falls back to SMS.
options: { code_size: 6, preferred_channel: 'rcs' },
// Defaults to RCS (cheaper); Prelude falls back to SMS. locale is
// hardcoded to en-US so the message text is always English.
options: { code_size: 6, preferred_channel: 'rcs', locale: 'en-US' },
signals: { ip: '203.0.113.7' },
});
});
@@ -131,6 +132,7 @@ describe('PreludeClient', () => {
expect(JSON.parse(init.body).options).toEqual({
code_size: 6,
preferred_channel: 'sms', // config override beats the rcs default
locale: 'en-US',
template_id: 'tmpl_puter',
sender_id: 'Puter',
});
@@ -144,6 +144,7 @@ export class PreludeClient extends PuterClient {
preferred_channel:
this.config.prelude?.preferredChannel ??
DEFAULT_PREFERRED_CHANNEL,
locale: 'en-US',
};
// Branding lives in the Prelude dashboard (the message text is a
// template); these just select a Puter-branded template / sender when