feat(notifications): update Telegram bot support and update settings management

This commit is contained in:
Yusuf İpek
2026-03-01 17:28:25 +03:00
parent f011ce4f05
commit 147e5520a3
6 changed files with 74 additions and 54 deletions
+3 -2
View File
@@ -456,10 +456,11 @@ export async function notifyUsers(userIds: string[], event: NotificationEvent):
const promises: Promise<boolean>[] = [];
const tz = settings.timezone || 'UTC';
if (settings.telegramEnabled && settings.telegramBotToken && settings.telegramChatId) {
const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN;
if (settings.telegramEnabled && telegramBotToken && settings.telegramChatId) {
const msg = formatTelegramMessage(event, tz);
promises.push(sendTelegram(
settings.telegramBotToken,
telegramBotToken,
settings.telegramChatId,
msg.text,
msg.buttonLabel,