fix: Adds assignee as a participant during auto-assign (#6789)

- Ensures that the assignee is added as a participant during auto-assign
This commit is contained in:
Sojan Jose
2023-03-30 11:39:53 +05:30
committed by GitHub
parent a4c9a2b2f2
commit 7e3a4d2c20
3 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ module AutoAssignmentHandler
return unless should_run_auto_assignment?
::AutoAssignment::AgentAssignmentService.new(conversation: self, allowed_agent_ids: inbox.member_ids_with_assignment_capacity).perform
conversation_participants.find_or_create_by(user_id: assignee_id) if assignee_id.present?
end
def should_run_auto_assignment?