Chore: Refactor round robin logic (#1015)

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Sojan Jose
2020-07-08 00:14:07 +05:30
committed by GitHub
parent 49db9c5d8a
commit 0fc0dc1683
18 changed files with 197 additions and 74 deletions

View File

@@ -188,7 +188,7 @@ class Conversation < ApplicationRecord
return unless conversation_status_changed_to_open?
return unless should_round_robin?
inbox.next_available_agent.then { |new_assignee| update_assignee(new_assignee) }
::RoundRobin::AssignmentService.new(conversation: self).perform
end
def create_status_change_message(user_name)