mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Fix events
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user