Added a new event conversation_bot_resolved and added a job to auto resolve the bot conversations if there was no activity for the last 1 hour.
11 lines
375 B
Ruby
11 lines
375 B
Ruby
# app/jobs/response_document_content_job.rb
|
|
class ResponseBot::ResponseDocumentContentJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(response_document)
|
|
# Replace the selector with the actual one you need.
|
|
content = PageCrawlerService.new(response_document.document_link).body_text_content
|
|
response_document.update!(content: content[0..15_000])
|
|
end
|
|
end
|