From 897d882c35e1dc1a14c88dd033992b49d11c40f4 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 22 Oct 2020 14:45:05 +0800 Subject: [PATCH] update Notifiability interface --- pkg/bbgo/notifier.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/bbgo/notifier.go b/pkg/bbgo/notifier.go index 82317753e..b24f4849b 100644 --- a/pkg/bbgo/notifier.go +++ b/pkg/bbgo/notifier.go @@ -25,6 +25,12 @@ func (m *Notifiability) AddNotifier(notifier Notifier) { func (m *Notifiability) Notify(msg string, args ...interface{}) { for _, n := range m.notifiers { - n.NotifyTo("", msg, args...) + n.Notify(msg, args...) + } +} + +func (m *Notifiability) NotifyTo(channel, msg string, args ...interface{}) { + for _, n := range m.notifiers { + n.NotifyTo(channel, msg, args...) } }