feat(conversations): add message creation limit lock
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user