2026-04-23 on prod. M3 shipped the Telegram infrastructure (bot token storage, group CRUD,
webhook/cron routes, send log); NIX-OS-73 completes the wiring so events from the POS flow
actually reach subscribed groups. Three events now fire:
session_closed from the close-shift action,
new_order from /api/odoo/order, and
daily_report from the /api/telegram/cron/daily cron — now using
the new fetchDailyReport (NIX-OS-72) instead of monthly figures. All three
route through a single central notifyEvent() dispatcher with per-send audit
logging, and every call is fire-and-forget so a Telegram outage can never block a sale.
cafe.telegram_send_log shape (no opted-in groups → zero rows, correct
short-circuit). The formatter emits HTML-safe session_closed payloads with
cashier name, duration, order count, gross/net, cash movements, diff + reason.
lib/telegram/notify.ts (dispatcher) and
lib/telegram/messages.ts (pure HTML-escaped formatters, unit-tested).
Modified: closeShiftAction, /api/odoo/order,
/api/telegram/cron/daily (now uses fetchDailyReport + ?dry=1 flag).