fix: Remove media template filtering from Vuex store getter
The root cause of media header templates not appearing was in the Vuex store getter `getWhatsAppTemplates` which was explicitly filtering out templates with IMAGE and VIDEO components. This fix removes the media filtering logic to allow all approved WhatsApp templates to be available in the template selector, including those with: - IMAGE headers - VIDEO headers - DOCUMENT headers Now the `order_confirmation` template and other media templates will appear in the template picker as expected. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -44,13 +44,9 @@ export const getters = {
|
||||
const messagesTemplates =
|
||||
whatsAppMessageTemplates || apiInboxMessageTemplates;
|
||||
|
||||
// filtering out the whatsapp templates with media
|
||||
// Return all WhatsApp templates including media templates
|
||||
if (messagesTemplates instanceof Array) {
|
||||
return messagesTemplates.filter(template => {
|
||||
return !template.components.some(
|
||||
i => i.format === 'IMAGE' || i.format === 'VIDEO'
|
||||
);
|
||||
});
|
||||
return messagesTemplates;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user