Revert "fix: preserve closed status on bot assignment"

This reverts commit 50b373c151.
This commit is contained in:
Sojan Jose
2026-06-26 16:16:43 -07:00
parent 50b373c151
commit 1c5ebcea0c
2 changed files with 1 additions and 9 deletions
@@ -27,7 +27,7 @@ class Conversations::AssignmentService
conversation.assignee = nil
conversation.assignee_agent_bot = agent_bot
conversation.status = :pending if conversation.open?
conversation.status = :pending
conversation.save!
agent_bot
end
@@ -65,14 +65,6 @@ describe Conversations::AssignmentService do
expect(conversation.assignee_id).to be_nil
expect(conversation.status).to eq('pending')
end
it 'preserves status when assigning an agent bot to a closed conversation' do
conversation.update!(assignee: agent, assignee_agent_bot: nil, status: :resolved)
service.perform
expect(conversation.reload.status).to eq('resolved')
end
end
end
end