iachat/app
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
..
actions fix: Disable enqueueing Avatar jobs if the URL is invalid (#12035) 2025-07-24 12:56:39 +04:00
assets feat: Hide installation identifier (#11722) 2025-06-17 15:45:40 -07:00
builders fix: missing metrics and labels from label summary (#11718) 2025-06-12 17:58:56 +05:30
channels fix: Move contact events to account stream rather than individual user stream (#11082) 2025-03-13 17:46:48 -07:00
controllers feat: Add route to list accounts that belongs to a platform_app (#12140) 2025-08-11 21:23:05 +02:00
dashboards chore: improve plan-based feature handling with plan hierarchy (#11335) 2025-04-28 14:13:56 -07:00
dispatchers feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
drops feat: Add the support for custom attributes in message variables (#8511) 2023-12-08 14:13:35 -08:00
fields chore: improve plan-based feature handling with plan hierarchy (#11335) 2025-04-28 14:13:56 -07:00
finders perf: fix notifications duplicate query and add composite index (#12110) 2025-08-07 15:59:40 +05:30
helpers fix: incorrect first response time for reopened conversations (#12058) 2025-08-13 16:39:43 +05:30
javascript feat: Add automation rule event conversation resolved (#9669) 2025-08-13 12:57:14 +05:30
jobs fix: Disable IMAP inboxes that requires authorization (#12092) 2025-08-01 16:32:29 -07:00
listeners fix: incorrect first response time for reopened conversations (#12058) 2025-08-13 16:39:43 +05:30
mailboxes fix: Disable automations on auto-reply emails (#12101) 2025-08-05 13:17:06 +05:30
mailers fix: footer in ssl_instructions email (#12076) 2025-07-31 11:44:17 -07:00
models fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
policies feat(cloud): Add support for viewing status of SSL in custom domains (#12011) 2025-07-30 10:52:47 -07:00
presenters fix: Disable automations on auto-reply emails (#12101) 2025-08-05 13:17:06 +05:30
services fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
views feat: Add route to list accounts that belongs to a platform_app (#12140) 2025-08-11 21:23:05 +02:00
workers feat: API Endpoints to update message status (#11387) 2025-04-29 15:33:11 -07:00