Commit Graph

3 Commits

Author SHA1 Message Date
Abhinav Raut 7a53cf9ae2 fix bugs and clean up code 2026-06-27 15:02:21 +05:30
Abhinav Raut ef80ba2fbf fix WhatsApp webhook ingestion gaps
Status events arriving before their message were silently dropped. Contacts with no email/ext_id could accumulate orphan rows on retry. Corrupt inbox configs were skipped without logging.
2026-06-27 13:33:10 +05:30
Abhinav Raut 74599df708 feat: durable WhatsApp inbound queue
Move WhatsApp inbound off the in-memory worker pool onto a new Redis Streams queue (internal/streamqueue): at-least-once, reclaim of orphaned entries, dead-letter for poison entries, panic-safe. The webhook verifies the signature from the in-memory inbox and 200-ACKs only after a successful enqueue, so a DB blip or restart no longer drops messages. The worker honors context cancellation for fast shutdown, dedups before downloading media, and routes template status updates by WABA.
2026-06-14 11:27:17 +05:30