From 109b43aadb7da14a11a846c4771fcd3b12e7ad28 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:05:05 +0530 Subject: [PATCH] chore: Disable API channel reply editor outside 24h window (#13664) --- .../widgets/WootWriter/ReplyBottomPanel.vue | 6 +++++- .../components/widgets/conversation/ReplyBox.vue | 12 ++++++++---- .../dashboard/i18n/locale/en/conversation.json | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue b/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue index bc0001238..5f76041dc 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue @@ -380,7 +380,11 @@ export default { @click="$emit('selectContentTemplate')" /> diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue index e55f13b7c..23b4d89a8 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue @@ -200,9 +200,13 @@ export default { }, messagePlaceHolder() { if (this.isEditorDisabled) { - return this.isAWhatsAppChannel - ? this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED_WHATSAPP') - : this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED'); + if (this.isAWhatsAppChannel) { + return this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED_WHATSAPP'); + } + if (this.isAPIInbox) { + return this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED_API'); + } + return this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED'); } return this.isPrivate ? this.$t('CONVERSATION.FOOTER.PRIVATE_MSG_INPUT') @@ -427,7 +431,7 @@ export default { }, isEditorDisabled() { return ( - this.isAWhatsAppChannel && + (this.isAWhatsAppChannel || this.isAPIInbox) && !this.isOnPrivateNote && !this.currentChat.can_reply ); diff --git a/app/javascript/dashboard/i18n/locale/en/conversation.json b/app/javascript/dashboard/i18n/locale/en/conversation.json index 23552a162..835a7e512 100644 --- a/app/javascript/dashboard/i18n/locale/en/conversation.json +++ b/app/javascript/dashboard/i18n/locale/en/conversation.json @@ -192,6 +192,7 @@ "PRIVATE_MSG_INPUT": "Shift + enter for new line. This will be visible only to Agents", "MESSAGING_RESTRICTED": "You cannot reply to this conversation", "MESSAGING_RESTRICTED_WHATSAPP": "You can only reply using a template message due to 24-hour message window restriction", + "MESSAGING_RESTRICTED_API": "You can only reply using a template message due to message window restriction", "MESSAGE_SIGNATURE_NOT_CONFIGURED": "Message signature is not configured, please configure it in profile settings.", "COPILOT_MSG_INPUT": "Give copilot additional prompts, or ask anything else... Press enter to send follow-up", "CLICK_HERE": "Click here to update",