diff --git a/packages/messages/__tests__/messages.test.ts b/packages/messages/__tests__/messages.test.ts index 0e7d0235..c08b00d1 100644 --- a/packages/messages/__tests__/messages.test.ts +++ b/packages/messages/__tests__/messages.test.ts @@ -104,7 +104,7 @@ describe('Messages', () => { ${new MessengerVideo({ url: 'http://example.com/video.mp4' }, '12225551234', '13335551234')} | ${'video'} ${new WhatsAppFile({ url: 'http://example.com/file.pdf' }, '12225551234', '13335551234')} | ${'file'} ${new MessengerFile({ url: 'http://example.com/file.pdf' }, '12225551234', '13335551234')} | ${'file'} - ${new TemplateMessage({ name: 'MyNamespace:MyTemplate', parameters: [{ key: 'Bob Smith' }] }, '12225551234', '13335551234', 'en-GB')} | ${['template', 'whatsapp']} + ${new TemplateMessage({ name: 'MyNamespace:MyTemplate', parameters: ['Bob Smith'] }, '12225551234', '13335551234', 'en-GB')} | ${['template', 'whatsapp']} ${new CustomMessage({ type: 'template', template: {} }, '12225551234', '13335551234')} | ${'custom'} `( 'can send various multimedia messages', diff --git a/packages/messages/lib/interfaces/WhatsApp/MessageTemplate.ts b/packages/messages/lib/interfaces/WhatsApp/MessageTemplate.ts index fc3d52c3..7463aaa0 100644 --- a/packages/messages/lib/interfaces/WhatsApp/MessageTemplate.ts +++ b/packages/messages/lib/interfaces/WhatsApp/MessageTemplate.ts @@ -1,4 +1,4 @@ export interface MessageTemplate { name: string - parameters: { key: string }[] + parameters: string[] }