mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 08:48:43 +02:00
refactor and fix duplicate notification
This commit is contained in:
@@ -192,9 +192,10 @@ func (cfg *Config) initNotification(notifCfg []types.NotificationConfig) (err E.
|
||||
if len(notifCfg) == 0 {
|
||||
return
|
||||
}
|
||||
dispatcher := notif.StartNotifDispatcher(cfg.task)
|
||||
errs := E.NewBuilder("notification providers load errors")
|
||||
for i, notifier := range notifCfg {
|
||||
_, err := notif.RegisterProvider(cfg.task.Subtask("notifier"), notifier)
|
||||
_, err := dispatcher.RegisterProvider(notifier)
|
||||
if err == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user