feat: add Telegram watchdog as backup notification channel

- New src/telegramBot.js: separate process for health checks + Telegram notifications
- Updated src/whatsappApi.js notifyAdmin(): falls back to Telegram when WhatsApp API is down
- Updated .env.example with TELEGRAM_* configuration variables
- Design doc and implementation plan
This commit is contained in:
Eddy de Vink 2026-07-12 13:34:04 +02:00
commit 92289adc03
5 changed files with 458 additions and 1 deletions

View file

@ -16,3 +16,14 @@ MAX_REQUESTS_PER_DAY=5
# Admin notifications
ADMIN_NUMBER=31612345678@c.us
# Telegram watchdog (fallback when WhatsApp API is down)
TELEGRAM_BOT_URL=http://localhost:3004
# Telegram watchdog configuration (telegram-bot process)
TELEGRAM_BOT_TOKEN=
TELEGRAM_ADMIN_CHAT_ID=
TELEGRAM_BOT_PORT=3004
DIENST_BOT_HEALTH_URL=http://localhost:3002/health
WWEBJS_API_SESSION_URL=http://192.168.5.252:3001/session/status/EdGpt
HEALTH_CHECK_INTERVAL_MS=300000