Chatwoot/app/jobs/conversations/resolution_job.rb
2021-11-27 09:26:18 +05:30

8 lines
252 B
Ruby

class Conversations::ResolutionJob < ApplicationJob
queue_as :medium
def perform(account:)
resolvable_conversations = account.conversations.resolvable(account.auto_resolve_duration)
resolvable_conversations.each(&:toggle_status)
end
end