fix: bot handoff should set waiting time (#13417)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Shivam Mishra
2026-02-27 15:31:49 +05:30
committed by GitHub
parent d84ae196d5
commit df92fd12cb
4 changed files with 84 additions and 4 deletions

View File

@@ -42,10 +42,10 @@ class Captain::Conversation::ResponseBuilderJob < ApplicationJob
end
def process_response
ActiveRecord::Base.transaction do
if handoff_requested?
process_action('handoff')
else
if handoff_requested?
process_action('handoff')
else
ActiveRecord::Base.transaction do
create_messages
Rails.logger.info("[CAPTAIN][ResponseBuilderJob] Incrementing response usage for #{account.id}")
account.increment_response_usage