mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-25 17:15:04 +02:00
feat(telegram): honor CLAUDE_MEM_TELEGRAM_ENABLED master toggle
Adds an explicit on/off flag (default 'true') so users can disable the notifier without clearing credentials. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -63,6 +63,10 @@ async function postOne(botToken: string, chatId: string, text: string): Promise<
|
||||
}
|
||||
|
||||
export async function notifyTelegram(input: TelegramNotifyInput): Promise<void> {
|
||||
if (!SettingsDefaultsManager.getBool('CLAUDE_MEM_TELEGRAM_ENABLED')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const botToken = SettingsDefaultsManager.get('CLAUDE_MEM_TELEGRAM_BOT_TOKEN');
|
||||
const chatId = SettingsDefaultsManager.get('CLAUDE_MEM_TELEGRAM_CHAT_ID');
|
||||
if (!botToken || !chatId) {
|
||||
|
||||
@@ -77,6 +77,7 @@ export interface SettingsDefaults {
|
||||
CLAUDE_MEM_CHROMA_TENANT: string;
|
||||
CLAUDE_MEM_CHROMA_DATABASE: string;
|
||||
// Telegram Notifier
|
||||
CLAUDE_MEM_TELEGRAM_ENABLED: string;
|
||||
CLAUDE_MEM_TELEGRAM_BOT_TOKEN: string;
|
||||
CLAUDE_MEM_TELEGRAM_CHAT_ID: string;
|
||||
CLAUDE_MEM_TELEGRAM_TRIGGER_TYPES: string;
|
||||
@@ -153,6 +154,7 @@ export class SettingsDefaultsManager {
|
||||
CLAUDE_MEM_CHROMA_TENANT: 'default_tenant',
|
||||
CLAUDE_MEM_CHROMA_DATABASE: 'default_database',
|
||||
// Telegram Notifier
|
||||
CLAUDE_MEM_TELEGRAM_ENABLED: 'true',
|
||||
CLAUDE_MEM_TELEGRAM_BOT_TOKEN: '',
|
||||
CLAUDE_MEM_TELEGRAM_CHAT_ID: '',
|
||||
CLAUDE_MEM_TELEGRAM_TRIGGER_TYPES: 'security_alert',
|
||||
|
||||
Reference in New Issue
Block a user