Standalone Turn.io Lua app for permanent WhatsApp delivery failures on SynCH contacts.
- Installs manifest-defined app resources from
assets/manifest.jsononinstall,config_changed,upgrade, anddowngrade. - Subscribes to delivery errors
131026and131050. - Reapplies the same delivery-error subscriptions on
config_changed,upgrade, anddowngrade. - Uninstalls manifest-defined resources on
uninstallbefore clearing delivery-error subscriptions. - Clears delivery-error subscriptions on
uninstall. - Sets
synch_remindersto"false"when a supported delivery error arrives for a contact that is not yet suppressed. - Records the first delivery-failure message ID in
synch_delivery_failure_message_id. - Backfills
synch_delivery_failure_message_idwhen reminders are already suppressed but delivery-failure provenance is missing. - Leaves the original
synch_delivery_failure_message_idunchanged on later permanent failures. - Processes every error in a batch and returns failure if any contact update still fails after retries.
- Accepts
contact_fields_changedas a no-op, returns404 Not foundforhttp_request, and returnsUnsupported journey eventforjourney_event.
Run commands from turn_apps/synch_delivery_failures/.
make test
make buildIf you do not already have a local turn-app alias, these make targets use the official Turn Lua SDK container directly.
synch_delivery_failures.lua: event handlerlib/delivery_failure_handler.lua: delivery-failure class used by the root event routerspec/synch_delivery_failures_spec.lua: app testsassets/manifest.json: app metadata and contact-field declarationassets/README.md: markdown shown in the Turn UI