diff --git a/src/backend/clients/prelude/PreludeClient.test.ts b/src/backend/clients/prelude/PreludeClient.test.ts index 2c016de40..f03d6d424 100644 --- a/src/backend/clients/prelude/PreludeClient.test.ts +++ b/src/backend/clients/prelude/PreludeClient.test.ts @@ -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', }); diff --git a/src/backend/clients/prelude/PreludeClient.ts b/src/backend/clients/prelude/PreludeClient.ts index dd0f21d16..716f06313 100644 --- a/src/backend/clients/prelude/PreludeClient.ts +++ b/src/backend/clients/prelude/PreludeClient.ts @@ -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