fix(voice): guarantee conference_sid at TwiML render, consistent Call factory
- conference_twiml now ensures call.conference_sid is present before rendering; backfills via Voice::Conference::Name.for(call) if missing. Prevents invalid TwiML on Call rows created without the sid set. - Call factory derives account/inbox/contact from the associated conversation so create(:call) is always internally consistent (no more mismatched account_id across associations).
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
FactoryBot.define do
|
||||
factory :call do
|
||||
association :account
|
||||
association :inbox
|
||||
association :conversation
|
||||
association :contact
|
||||
account { conversation.account }
|
||||
inbox { conversation.inbox }
|
||||
contact { conversation.contact }
|
||||
provider { :twilio }
|
||||
direction { :incoming }
|
||||
status { 'ringing' }
|
||||
|
||||
Reference in New Issue
Block a user