iachat/spec/services/whatsapp
Tanmay Deep Sharma 6b42ff8d39
fix: setup webhook for create and update should be done after db commit (#12176)
## Reference
https://github.com/chatwoot/chatwoot/pull/12149#issuecomment-3178108388

## Description

setup_webhook was done before the save, and hence the meta webhook
validation might fail because of a race condition where the facebook
validation is done before we saving the entry to the database.

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

- New inbox creation, webhook validation
- Existing inbox update, webhook validation
- 
<img width="614" height="674" alt="image"
src="https://github.com/user-attachments/assets/be223945-deed-475a-82e5-3ae9c54a13fa"
/>


## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-13 20:53:31 +05:30
..
providers fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
channel_creation_service_spec.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
embedded_signup_service_spec.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
facebook_api_client_spec.rb feat: Remove subscription on WhatsApp inbox delete (#11977) 2025-07-24 14:04:19 +04:00
incoming_message_service_spec.rb feat: Add WhatsApp profile for contact name resolution (#12123) 2025-08-12 14:20:52 +05:30
incoming_message_whatsapp_cloud_service_spec.rb fix: Check valid params exists in WhatsAapp payload (#6780) 2023-03-30 12:10:59 +05:30
oneoff_campaign_service_spec.rb fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
phone_info_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
send_on_whatsapp_service_spec.rb chore: WhatsApp template message error handling for invalid templates (#12157) 2025-08-11 20:08:52 +05:30
template_parameter_converter_service_spec.rb fix: Handle nil processed_params for WhatsApp templates without params (#12177) 2025-08-12 22:56:53 +05:30
token_exchange_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
token_validation_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
webhook_setup_service_spec.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
webhook_teardown_service_spec.rb feat: add reauth flow for wa embedded signup (#11940) 2025-08-08 01:48:45 +05:30