From 028902f21b6552b179494b14c2dfef24e6e3ede5 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Wed, 29 Mar 2017 14:43:09 +1100 Subject: [PATCH] Fix events --- events/events.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/events/events.go b/events/events.go index 97a2e753..d2c1ad73 100644 --- a/events/events.go +++ b/events/events.go @@ -98,9 +98,9 @@ func (e *Event) ExecuteAction() bool { if action[0] == ACTION_SMS_NOTIFY { message := fmt.Sprintf("Event triggered: %s", e.EventToString()) if action[1] == "ALL" { - smsglobal.SMSSendToAll(message, &config.GetConfig()) + smsglobal.SMSSendToAll(message, config.Cfg) } else { - smsglobal.SMSNotify(smsglobal.SMSGetNumberByName(action[1]), message, &config.GetConfig()) + smsglobal.SMSNotify(smsglobal.SMSGetNumberByName(action[1], config.Cfg.SMS), message, config.Cfg) } } } else { @@ -191,7 +191,7 @@ func IsValidEvent(Exchange, Item, Condition, Action string) error { return ErrInvalidAction } - if action[1] != "ALL" && smsglobal.SMSGetNumberByName(action[1], &config.GetConfig().SMS) == smsglobal.ErrSMSContactNotFound { + if action[1] != "ALL" && smsglobal.SMSGetNumberByName(action[1], config.Cfg.SMS) == smsglobal.ErrSMSContactNotFound { return ErrInvalidAction } } else {