Revert "fix: preserve closed status on bot assignment"
This reverts commit 50b373c151.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user