Add Telegram cancellation import functionality with tests and documentation
- Implemented Telegram cancellation parsing logic in `telegramCancellationParser.js`. - Created unit tests for cancellation parsing in `telegramCancellationParser.test.js`. - Developed integration tests for Telegram import service in `telegramImport.integration.test.js`. - Added API tests for Telegram import endpoints in `telegramImportApi.test.js`. - Introduced service tests for Telegram import logic in `telegramImportService.test.js`. - Documented the Telegram cancellation import process in `telegram-cancellation-import.md`. - Built a React component for managing Telegram imports in `TelegramImportPanel.jsx`.
This commit is contained in:
14
.env.example
14
.env.example
@@ -28,6 +28,20 @@ FIREBASE_SECRETS_DIR=/opt/polotsk-transit/secrets
|
||||
# with the absolute host path to the JSON file.
|
||||
GOOGLE_APPLICATION_CREDENTIALS=/run/secrets/firebase-service-account.json
|
||||
|
||||
# Telegram cancellation import through a separate user account (MTProto).
|
||||
# Get API credentials at my.telegram.org. Never put a session in the checkout.
|
||||
TELEGRAM_IMPORT_ENABLED=false
|
||||
TELEGRAM_AUTO_PUBLISH=true
|
||||
TELEGRAM_API_ID=
|
||||
TELEGRAM_API_HASH=
|
||||
TELEGRAM_CHANNEL=avp2Polotsk
|
||||
TELEGRAM_CITY_SLUG=polotsk
|
||||
TELEGRAM_POLL_INTERVAL_MS=60000
|
||||
# Host directory, mounted read-only into the backend container.
|
||||
TELEGRAM_SECRETS_DIR=/opt/polotsk-transit/telegram-secrets
|
||||
# For direct Node.js launches, replace this with the absolute host path.
|
||||
TELEGRAM_SESSION_FILE=/run/telegram-secrets/account.session
|
||||
|
||||
# Bootstrap admin
|
||||
BOOTSTRAP_ADMIN=true
|
||||
BOOTSTRAP_ADMIN_RESET_PASSWORD=false
|
||||
|
||||
Reference in New Issue
Block a user