feat(conversations): add message creation limit lock

This commit is contained in:
Sony Mathew
2026-07-02 00:28:31 +05:30
parent 926a9d8a69
commit 48e7985b0f
73 changed files with 1691 additions and 58 deletions
@@ -6,6 +6,8 @@ class Integrations::BotProcessorService
return unless should_run_processor?(message)
process_content(message)
rescue CustomExceptions::ConversationMessageCreationLocked => e
Rails.logger.info("Skipping bot processor response because message creation is locked (#{e.message})")
rescue StandardError => e
ChatwootExceptionTracker.new(e, account: (hook&.account || agent_bot&.account)).capture_exception
end
@@ -2,6 +2,8 @@ class Integrations::Dyte::ProcessorService
pattr_initialize [:account!, :conversation!]
def create_a_meeting(agent)
raise CustomExceptions::ConversationMessageCreationLocked, conversation if conversation.message_creation_locked?
return missing_realtimekit_credentials_response if realtimekit_credentials_missing?
title = I18n.t('integration_apps.dyte.meeting_name', agent_name: agent.available_name)
@@ -7,6 +7,9 @@ module Integrations::Slack::SlackMessageHelper
rescue Slack::Web::Api::Errors::MissingScope => e
ChatwootExceptionTracker.new(e, account: conversation.account).capture_exception
disable_and_reauthorize
rescue CustomExceptions::ConversationMessageCreationLocked => e
Rails.logger.info("[SlackMessageHelper] Dropped message for conversation #{conversation.display_id}: #{e.message}")
success_response
end
def handle_conversation