don't log that we sent notifications when nothing set up

This commit is contained in:
Josh Harvey 2016-07-31 17:00:46 +03:00
parent a5bd4c4311
commit c3d8168f49

View file

@ -681,6 +681,7 @@ function sendMessage (rec) {
if (pluginType === 'sms') return smsPlugin.sendMessage(rec)
throw new Error('No such plugin type: ' + pluginType)
})
return Promise.all(pluginPromises)
}
exports.sendMessage = sendMessage
@ -729,8 +730,9 @@ function checkNotification () {
return sendMessage(rec)
})
.then(() => {
logger.debug('Successfully sent alerts')
.then(results => {
console.log('DEBUG25')
if (results.length > 0) logger.debug('Successfully sent alerts')
})
.catch(err => {
logger.error(err)