fix review changes

This commit is contained in:
Tanmay Sharma
2025-08-29 16:26:19 +07:00
parent 5d27fd798f
commit a4fab22e28
6 changed files with 89 additions and 55 deletions
@@ -32,11 +32,11 @@ class AutoAssignment::AssignmentService
def unassigned_conversations(limit)
scope = inbox.conversations.unassigned.open
if assignment_config['conversation_priority'] == 'longest_waiting'
scope = scope.order(last_activity_at: :asc, created_at: :asc)
else
scope.order(created_at: :asc)
end
scope = if assignment_config['conversation_priority'] == 'longest_waiting'
scope.order(last_activity_at: :asc, created_at: :asc)
else
scope.order(created_at: :asc)
end
scope.limit(limit)
end