feat: Enhanced WhatsApp template support with media headers (#11997)

This commit is contained in:
Muhsin Keloth
2025-08-11 18:49:05 +05:30
committed by GitHub
parent 1baf5cbe19
commit 6784eb9b3d
10 changed files with 826 additions and 104 deletions

View File

@@ -165,19 +165,17 @@ describe Whatsapp::Providers::WhatsappCloudService do
let(:template_body) do
{
messaging_product: 'whatsapp',
recipient_type: 'individual', # Added recipient_type field
to: '+123456789',
type: 'template',
template: {
name: template_info[:name],
language: {
policy: 'deterministic',
code: template_info[:lang_code]
},
components: [
{ type: 'body',
parameters: template_info[:parameters] }
]
},
type: 'template'
components: template_info[:parameters] # Changed to use parameters directly (enhanced format)
}
}
end