fix #261 provide default config for notification setting

This commit is contained in:
TonyQ 2021-12-04 02:37:21 +00:00
parent 543ac84c27
commit 30c14a6828

View File

@ -616,6 +616,15 @@ func (environ *Environment) ConfigureNotificationSystem(userConfig *Config) erro
environ.Notifiability.AddNotifier(notifier)
}
if userConfig.Notifications == nil {
userConfig.Notifications = &NotificationConfig{
Routing : &SlackNotificationRouting{
Trade: "$session",
Order: "$session",
},
}
}
if userConfig.Notifications != nil {
if err := environ.ConfigureNotificationRouting(userConfig.Notifications); err != nil {
return err