chatwoot/spec/factories/calls.rb
Muhsin Keloth 1124c1b4c2
feat(voice): Wire Twilio voice flow through unified call model (#14091)
Twilio voice now uses first-class `Call` records as the source of truth
for call state, instead of storing it on
`conversation.additional_attributes` and `conversation.identifier`. Each
call gets its own record, its own `voice_call` bubble matched by
`call_sid`, and its own conference name keyed off `Call.id`. Multiple
calls on the same conversation (for `lock_to_single_conversation`
inboxes) now work correctly, and the conversation card stays in sync
with the real latest message.
Fixes https://linear.app/chatwoot/issue/PLA-121/lock-to-single-thread

---------

Co-authored-by: Muhsin <12408980+muhsin-k@users.noreply.github.com>
2026-04-30 11:25:39 +04:00

13 lines
337 B
Ruby

FactoryBot.define do
factory :call do
association :conversation
account { conversation.account }
inbox { conversation.inbox }
contact { conversation.contact }
provider { :twilio }
direction { :incoming }
status { 'ringing' }
sequence(:provider_call_id) { |n| "CA#{SecureRandom.hex(15)}#{n}" }
end
end