fix: Show WhatsApp templates only for inboxes with templates (#12965)

Fixed the logic to show WhatsApp templates option only for inboxes that have templates available.
This commit is contained in:
Muhsin Keloth
2025-11-26 21:01:31 +05:30
committed by GitHub
parent 6a83cad69d
commit 73ad27e94c

View File

@@ -174,7 +174,12 @@ export default {
return false;
},
showWhatsappTemplates() {
return this.isAWhatsAppCloudChannel && !this.isPrivate;
// We support WhatsApp templates for API channels if someone updates templates manually via API
// That's why we don't explicitly check for WhatsApp channel type here
const templates = this.$store.getters['inboxes/getWhatsAppTemplates'](
this.inboxId
);
return !!(templates && templates.length) && !this.isPrivate;
},
showContentTemplates() {
return this.isATwilioWhatsAppChannel && !this.isPrivate;