Skip to content

Commit 24473cf

Browse files
committed
☕ chore: update environment variables
1 parent c2ca55d commit 24473cf

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,12 @@ nano .env
352352

353353
```bash
354354
TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
355-
POSTGRES_URL=postgresql://postgres:postgres@localhost:5432/unthread_bot
355+
POSTGRES_URL=postgresql://postgres:postgres@localhost:5432/unthread_telegram_bot
356356
UNTHREAD_API_KEY=your_unthread_api_key
357357
UNTHREAD_SLACK_CHANNEL_ID=your_unthread_slack_channel_id
358358
UNTHREAD_WEBHOOK_SECRET=your_unthread_webhook_secret
359359
PLATFORM_REDIS_URL=redis://localhost:6379
360-
WEBHOOK_REDIS_URL=redis://localhost:6380
360+
WEBHOOK_REDIS_URL=redis://localhost:6379
361361
```
362362

363363
**Optional environment variables:**

src/config/env.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Validates and manages environment variables required for the Unthread Telegram Bot
55
* to function properly. This module ensures all necessary API keys, database connections,
66
* and service endpoints are configured before the bot starts.
7-
*
87
* Required Environment Variables:
98
* - TELEGRAM_BOT_TOKEN: Telegram Bot API authentication token
109
* - UNTHREAD_API_KEY: Unthread platform API key for ticket creation
@@ -14,6 +13,12 @@
1413
* - WEBHOOK_REDIS_URL: Redis connection for webhook event processing
1514
* - POSTGRES_URL: PostgreSQL database connection for persistent storage
1615
*
16+
* Optional Environment Variables:
17+
* - DATABASE_SSL_VALIDATE: SSL validation mode for database connections (true/false)
18+
* - NODE_ENV: Runtime environment (development/production)
19+
* - WEBHOOK_POLL_INTERVAL: Webhook polling interval in milliseconds
20+
* - COMPANY_NAME: Company name for ticket attribution
21+
*
1722
* Security:
1823
* - Validates all critical environment variables at startup
1924
* - Provides clear error messages for missing configuration * - Prevents bot startup with incomplete configuration

src/handlers/webhookMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
* - Message formatting and threading preservation
1818
* - Integration with Bots Brain storage for conversation context
1919
* - Real-time agent response delivery to Telegram users
20-
*
2120
* Error Handling:
2221
* - Graceful handling of blocked users and deleted chats
23-
* - Rate limiting and API error recovery * - Comprehensive logging for debugging and monitoring
22+
* - Rate limiting and API error recovery
23+
* - Comprehensive logging for debugging and monitoring
2424
*
2525
* @author Waren Gonzaga, WG Technology Labs
2626
* @version 1.0.0

src/sdk/bots-brain/BotsStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
* - Customer profile management
1919
* - Message history and threading
2020
* - Form data collection and validation
21-
*
2221
* Performance:
2322
* - Multi-layer caching for optimal performance
2423
* - Automatic fallback between storage layers
2524
* - Memory cache for frequently accessed data
26-
* - Redis for distributed caching across instances * - PostgreSQL for permanent data persistence
25+
* - Redis for distributed caching across instances
26+
* - PostgreSQL for permanent data persistence
2727
*
2828
* @author Waren Gonzaga, WG Technology Labs
2929
* @version 1.0.0

src/sdk/bots-brain/UnifiedStorage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* Reliability:
2727
* - Graceful degradation when storage layers are unavailable
2828
* - Automatic retry mechanisms with exponential backoff
29-
* - Data consistency guarantees across all layers * - Comprehensive error handling and logging
30-
*
29+
* - Data consistency guarantees across all layers
30+
* - Comprehensive error handling and logging
3131
* @author Waren Gonzaga, WG Technology Labs
3232
* @version 1.0.0
3333
* @since 2025

src/sdk/unthread-webhook/EventValidator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import type { WebhookEvent, MessageCreatedEvent, ConversationUpdatedEvent } from
2828
* Error Handling:
2929
* - Detailed validation error reporting
3030
* - Graceful handling of invalid events
31-
* - Comprehensive logging for debugging * - Silent rejection of malicious events
31+
* - Comprehensive logging for debugging
32+
* - Silent rejection of malicious events
3233
*
3334
* @author Waren Gonzaga, WG Technology Labs
3435
* @version 1.0.0

src/services/unthread.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
* Security:
2828
* - API key authentication
2929
* - Request signing and validation
30-
* - Rate limiting compliance * - Data sanitization and validation
30+
* - Rate limiting compliance
31+
* - Data sanitization and validation
3132
*
3233
* @author Waren Gonzaga, WG Technology Labs
3334
* @version 1.0.0

0 commit comments

Comments
 (0)