Merge branch 'feat/whatsapp-call-meta-bridge' into feat/whatsapp-call-ui
This commit is contained in:
@@ -76,7 +76,7 @@ module Enterprise::Whatsapp::Providers::WhatsappCloudService
|
||||
|
||||
def initiate_call_body(to_phone_number, sdp_offer)
|
||||
{
|
||||
messaging_product: 'whatsapp', to: to_phone_number, type: 'audio',
|
||||
messaging_product: 'whatsapp', to: to_phone_number, action: 'connect',
|
||||
session: { sdp: sdp_offer, sdp_type: 'offer' }
|
||||
}.to_json
|
||||
end
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ describe Whatsapp::Providers::WhatsappCloudService do
|
||||
describe '#initiate_call' do
|
||||
it 'returns the parsed body on success' do
|
||||
stub_request(:post, calls_url)
|
||||
.with(body: { messaging_product: 'whatsapp', to: '15551234567', type: 'audio',
|
||||
.with(body: { messaging_product: 'whatsapp', to: '15551234567', action: 'connect',
|
||||
session: { sdp: 'sdp_offer', sdp_type: 'offer' } }.to_json)
|
||||
.to_return(status: 200, body: { messages: [{ id: 'wacall_1' }] }.to_json, headers: headers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user