apply broadcast option from config file

This commit is contained in:
c9s 2021-10-15 16:10:39 +08:00
parent 6c46c2cad1
commit f5f96b585a

View File

@ -605,7 +605,13 @@ func (environ *Environment) ConfigureNotificationSystem(userConfig *Config) erro
go interaction.Start(session) go interaction.Start(session)
var notifier = telegramnotifier.New(interaction) var opts []telegramnotifier.Option
if userConfig.Notifications != nil && userConfig.Notifications.Telegram != nil {
opts = append(opts, telegramnotifier.UseBroadcast())
}
var notifier = telegramnotifier.New(interaction, opts...)
environ.Notifiability.AddNotifier(notifier) environ.Notifiability.AddNotifier(notifier)
} }