mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-04 21:02:35 +08:00
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>
13 lines
337 B
Ruby
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
|