1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

pushover: ensure handles missing payload.

This commit is contained in:
Dave Conway-Jones 2020-04-17 09:43:45 +01:00
parent 436f169fd4
commit 92adb10fb3
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ module.exports = function(RED) {
if (isNaN(pri)) {pri=0;}
if (pri > 2) {pri = 2;}
if (pri < -2) {pri = -2;}
if (!msg.payload) { msg.payload = ""; }
if (typeof(msg.payload) === 'object') {
msg.payload = JSON.stringify(msg.payload);
}

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-pushover",
"version" : "0.0.17",
"version" : "0.0.18",
"description" : "A Node-RED node to send alerts via Pushover",
"dependencies" : {
"pushover-notifications" : "^1.2.1"