You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(meta): resolve race condition in Business API sender identification
The BusinessStartupService shared a mutable this.phoneNumber property
across concurrent webhook requests. When two webhooks arrived near-
simultaneously for the same phone_number_id, the second request could
overwrite phoneNumber before the first finished processing, causing
messages to be attributed to the wrong sender (wrong remoteJid).
Changes:
- Compute senderJid as a local variable before calling eventHandler
- Pass senderJid as parameter through eventHandler -> messageHandle
- Await eventHandler to prevent concurrent mutation
- Replace all this.phoneNumber reads inside messageHandle with the
local senderJid parameter
Made-with: Cursor
0 commit comments