wacrm/src/lib/automations
Arnas Donauskas f25f20ed63
fix(automations): order send_template params numerically, not lexicographically
Meta's template placeholders are positional ({{1}}, {{2}}, …). We
previously sorted the keys of step_config.variables lexicographically,
so a template with ≥10 variables got params in the order
"1", "10", "2", …, silently scrambling every render past the 9th
placeholder. Fix: sort numeric-looking keys by numeric value, fall back
to locale compare for non-numeric keys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 21:36:40 +03:00
..
admin-client.ts feat(automations): visual flow builder, engine, and logs viewer 2026-04-17 19:39:02 +03:00
engine.ts fix(automations): order send_template params numerically, not lexicographically 2026-04-17 21:36:40 +03:00
meta-send.ts fix(automations): actually send messages via Meta 2026-04-17 20:34:52 +03:00
steps-tree.ts feat(automations): visual flow builder, engine, and logs viewer 2026-04-17 19:39:02 +03:00
templates.ts feat(automations): visual flow builder, engine, and logs viewer 2026-04-17 19:39:02 +03:00
trigger-meta.ts feat(automations): add 'First Message from Contact' trigger 2026-04-17 20:47:13 +03:00