update Notifiability interface

This commit is contained in:
c9s 2020-10-22 14:45:05 +08:00
parent 3d69330e67
commit 897d882c35

View File

@ -25,6 +25,12 @@ func (m *Notifiability) AddNotifier(notifier Notifier) {
func (m *Notifiability) Notify(msg string, args ...interface{}) { func (m *Notifiability) Notify(msg string, args ...interface{}) {
for _, n := range m.notifiers { 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...)
} }
} }