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 {