Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
Ruby actioncablechat-widgetconversationcustomer-supportdashboarddesigndockerdocker-imageherokuintercomjavascriptlivechatopensourcerailsrubysassvuejswhatsappzendesk
fix(voice): stop chat auto-replies on calls and default call conversations to private note (#16312)
Pranav96a38ac00d1b
diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vueindex cd7b562e613..705e1d7464b 100644--- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue+++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue@@ -53,6 +53,8 @@ import ConversationResolveAttributesModal from 'dashboard/components-next/Converimport { useKbd } from 'dashboard/composables/utils/useKbd';import { isFileTypeAllowedForChannel } from 'shared/helpers/FileHelper';import { isAIAssigneeType } from 'dashboard/helper/agentHelper';+import { getLastMessage } from 'dashboard/helper/conversationHelper';+import { CONTENT_TYPES } from 'dashboard/components-next/message/constants';import { LOCAL_STORAGE_KEYS } from 'dashboard/constants/localStorage';import { FEATURE_FLAGS } from 'dashboard/featureFlags';@@ -251,6 +253,13 @@ export default {!this.isInstagramReplyRestricted);},+ isVoiceCallConversation() {+ if (!this.currentChat.messages) return false;+ return (+ getLastMessage(this.currentChat)?.content_type ===+ CONTENT_TYPES.VOICE_CALL+ );+ },isInstagramReplyRestricted() {return this.isMetaMessageSendingDisabled && this.isAnInstagramChannel;},@@ -541,6 +550,11 @@ export default {this.subject = '';// Reset Copilot editor state (includes cancelling ongoing generation)this.copilot.reset();+ // Default to a note on calls so a reply is not sent as SMS by accident.+ // Only on open, so an agent who switches to reply keeps it.+ if (this.isVoiceCallConversation) {+ this.replyType = REPLY_EDITOR_MODES.NOTE;+ }}if (this.isInstagramReplyRestricted) {@@ -596,7 +610,7 @@ export default {},mounted() {- if (this.isInstagramReplyRestricted) {+ if (this.isInstagramReplyRestricted || this.isVoiceCallConversation) {this.replyType = REPLY_EDITOR_MODES.NOTE;}diff --git a/app/services/message_templates/hook_execution_service.rb b/app/services/message_templates/hook_execution_service.rbindex a753d2e0ed5..353f2212ea3 100644--- a/app/services/message_templates/hook_execution_service.rb+++ b/app/services/message_templates/hook_execution_service.rb@@ -4,6 +4,8 @@ class MessageTemplates::HookExecutionServicedef performreturn if conversation.last_incoming_message.blank?return if message.auto_reply_email?+ # A call is not a chat message; greetings, out-of-office and bot replies would reach the caller as SMS.+ return if message.voice_call?trigger_templatesend