chore: update backend
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user