mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-05-15 14:18:52 +01:00
CREX-5826 - 2 SMS bug fix (#1193)
options.method = 'none' & variable name update Revert variable name
This commit is contained in:
@@ -111,16 +111,23 @@ private sendMessage(evt) {
|
|||||||
if (location.contactBookEnabled) {
|
if (location.contactBookEnabled) {
|
||||||
sendNotificationToContacts(msg, recipients, options)
|
sendNotificationToContacts(msg, recipients, options)
|
||||||
} else {
|
} else {
|
||||||
if (pushAndPhone != 'No') {
|
|
||||||
log.debug 'sending push'
|
|
||||||
options.method = 'push'
|
|
||||||
sendNotification(msg, options)
|
|
||||||
}
|
|
||||||
if (phone) {
|
if (phone) {
|
||||||
options.phone = phone
|
options.phone = phone
|
||||||
log.debug 'sending SMS'
|
if (pushAndPhone != 'No') {
|
||||||
sendNotification(msg, options)
|
log.debug 'Sending push and SMS'
|
||||||
|
options.method = 'both'
|
||||||
|
else {
|
||||||
|
log.debug 'Sending SMS'
|
||||||
|
options.method = 'phone'
|
||||||
|
}
|
||||||
|
else if (pushAndPhone != 'No') {
|
||||||
|
log.debug 'Sending push'
|
||||||
|
options.method = 'push'
|
||||||
|
} else {
|
||||||
|
log.debug 'Sending nothing'
|
||||||
|
options.method = 'none'
|
||||||
}
|
}
|
||||||
|
sendNotification(msg, options)
|
||||||
}
|
}
|
||||||
if (frequency) {
|
if (frequency) {
|
||||||
state[evt.deviceId] = now()
|
state[evt.deviceId] = now()
|
||||||
|
|||||||
Reference in New Issue
Block a user