← All tests

M3 Telegram Integration (prod)

NIX-OS-73 on prod, verified against get-coffee.nixtech.app/cafe. Per-tenant Telegram bot with encrypted token, groups CRUD with per-event receives flags, inbound webhook (/start, /help, /chatid, /report), and a shared-secret-auth cron endpoint for daily report pushes.

Loading…
41/41 total prod tests green — no regressions from this push.
test-m3-prod.mjs (NIX-OS-73 Telegram)8/8
test-m1-prod.mjs (Shop scoping)10/10
test-phase1-prod.mjs (SSO Phase 1)11/11
test-phase2-sso-outdoor-prod.mjs (SSO Phase 2)6/6
test-phase2-cafe-multishop-prod.mjs (Cafe Phase 2)6/6

Prod schema snapshot — cafe.telegram_*

Loading…

Follow-ups for the operator (not blocking this deploy)

1. Set CAFE_CRON_SECRET env var on the Cafe Cloudflare Pages project.
2. Add a Cloudflare Cron Trigger:
     schedule: "0 15 * * *"    (10pm Phnom Penh = 15:00 UTC)
     action:   POST https://{tenantCode}.nixtech.app/cafe/api/telegram/cron/daily
     headers:  X-Cron-Secret: {the-secret-above}
   OR use any external cron service with the same shape.
3. (Optional) Set NIX_COMMERCE_HOST env if the default https://nixtech.app
   doesn't match your deployment.
4. Per-tenant setup (done by a manager in Cafe UI):
     a. Create a bot via @BotFather → copy token
     b. /cafe/telegram → paste token → Save (webhook auto-registers)
     c. Add bot to a Telegram group → send "/chatid" → copy the ID
     d. Back in /cafe/telegram → Add group with that ID
     e. Toggle "Daily report" on → done