feat: Support for Whatsapp Cloud API (#4938)
Ability to configure Whatsapp Cloud API Inboxes fixes: #4712
This commit is contained in:
@@ -36,11 +36,17 @@ FactoryBot.define do
|
||||
|
||||
transient do
|
||||
sync_templates { true }
|
||||
validate_provider_config { true }
|
||||
end
|
||||
|
||||
before(:create) do |channel_whatsapp, options|
|
||||
# since factory already has the required message templates, we just need to bypass it getting updated
|
||||
channel_whatsapp.define_singleton_method(:sync_templates) { return } unless options.sync_templates
|
||||
channel_whatsapp.define_singleton_method(:validate_provider_config) { return } unless options.validate_provider_config
|
||||
if channel_whatsapp.provider == 'whatsapp_cloud'
|
||||
channel_whatsapp.provider_config = { 'api_key' => 'test_key', 'phone_number_id' => '123456789', 'business_account_id' => '123456789',
|
||||
'webhook_verify_token': 'test_token' }
|
||||
end
|
||||
end
|
||||
|
||||
after(:create) do |channel_whatsapp|
|
||||
|
||||
Reference in New Issue
Block a user