Merge pull request #12713 from rainzm/notify/mod_init

fix: adjust the initialization order of init function contents
This commit is contained in:
Zexi Li
2021-11-19 18:29:50 +08:00
committed by GitHub
2 changed files with 5 additions and 6 deletions
@@ -99,9 +99,3 @@ func (manager *NotificationManager) Send(s *mcclient.ClientSession, msg SNotifyM
_, err := manager.Create(s, params)
return err
}
func init() {
Notifications = NotificationManager{
Notification,
}
}
@@ -90,4 +90,9 @@ func init() {
[]string{},
)
modules.Register(&NotifySubscriber)
// important: Notifications' init must be behind Notication's init
Notifications = NotificationManager{
Notification,
}
}