diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json index 3a0faaed5..3f322c7e2 100644 --- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json @@ -267,7 +267,6 @@ "API_CALLBACK": { "TITLE": "Callback URL", "SUBTITLE": "You have to configure the webhook URL and the verification token in the Facebook Developer portal with the values shown below.", - "SUBTITLE_EMBEDDED": "We have configured the webhook URL and the verification token in the Facebook Developer portal with the values shown below.", "WEBHOOK_URL": "Webhook URL", "WEBHOOK_VERIFICATION_TOKEN": "Webhook Verification Token" }, diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue index c22b78977..8568df9bf 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue @@ -47,6 +47,13 @@ export default { this.currentInbox.provider === 'whatsapp_cloud' ); }, + // If the inbox is a whatsapp cloud inbox and the source is not embedded signup, then show the webhook details + shouldShowWhatsAppWebhookDetails() { + return ( + this.isWhatsAppCloudInbox && + this.currentInbox.provider_config?.source !== 'embedded_signup' + ); + }, message() { if (this.isATwilioInbox) { return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t( @@ -66,15 +73,10 @@ export default { )}`; } - if (this.isWhatsAppCloudInbox) { - const isEmbeddedSignup = - this.currentInbox.provider_config?.source === 'embedded_signup'; - - const subtitleKey = isEmbeddedSignup - ? 'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE_EMBEDDED' - : 'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE'; - - return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t(subtitleKey)}`; + if (this.isWhatsAppCloudInbox && this.shouldShowWhatsAppWebhookDetails) { + return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t( + 'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE' + )}`; } if (this.isAEmailInbox && !this.currentInbox.provider) { @@ -118,7 +120,10 @@ export default { :script="currentInbox.callback_webhook_url" /> -
+

{{ $t('INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.WEBHOOK_URL') }}