chore: update backend

This commit is contained in:
2026-05-03 12:31:45 +02:00
parent e4ddfaf8af
commit e6d9b09016
6 changed files with 29 additions and 13 deletions
+12 -3
View File
@@ -14,9 +14,10 @@ import (
var TelegramBot *TelegramService
type TelegramService struct {
botToken string
webhookSecret string
BotUsername string
botToken string
webhookSecret string
BotUsername string
notificationsEnabled bool
}
func NewTelegramService() *TelegramService {
@@ -33,6 +34,14 @@ func (t *TelegramService) IsConfigured() bool {
return t.botToken != ""
}
func (t *TelegramService) IsNotificationsEnabled() bool {
return t.notificationsEnabled
}
func (t *TelegramService) SetNotificationsEnabled(enabled bool) {
t.notificationsEnabled = enabled
}
// Reload met à jour le token et le username (appelé après UpdateSettings)
func (t *TelegramService) Reload(token, username string) {
if token != "" {