Executing sendNotificationToContacts always logs to Notifications when [event: false] is coded.
Anyone have a solution or workaround?
Sample code below when “theLog” is true two notifications are logged, when false one notification–should be no notifications
// log, send notification, SMS message
def doNotifications(message)
{
def localmsg=message+" at ${location.name}"
if (theLog)
{
sendNotificationEvent(localmsg)
}
if (location.contactBookEnabled && recipients)
{
sendNotificationToContacts(localmsg, recipients, [event: false])
}
if (thesendPush)
{
sendPushMessage(localmsg)
}
if (phone)
{
def phones = phone.split(";")
// log.debug "$phones"
for (def i = 0; i < phones.size(); i++)
{
sendSmsMessage(phones[i], localmsg)
}
}
}