diff --git a/social/nma/57-nma.js b/social/nma/57-nma.js index 017345b1..3870a05b 100644 --- a/social/nma/57-nma.js +++ b/social/nma/57-nma.js @@ -32,11 +32,17 @@ module.exports = function(RED) { } else { msg.payload = msg.payload.toString(); } if (node.pushkey) { - try { - nma(node.pushkey, "Node-RED", titl, msg.payload, 0 ); - } catch (e) { - node.warn("NMA error: "+ e); - } + nma({ + "apikey": node.pushkey, + "application": "Node-RED", + "event": titl, + "description": msg.payload, + "priority": 0 + }, function (error) { + if (error) { + node.warn("NMA error: " + error); + } + }); } else { node.warn("NMA credentials not set."); diff --git a/social/nma/package.json b/social/nma/package.json index 7004dd69..07932d16 100644 --- a/social/nma/package.json +++ b/social/nma/package.json @@ -1,9 +1,9 @@ { "name" : "node-red-node-nma", - "version" : "0.0.1", + "version" : "0.0.2", "description" : "A Node-RED node to send alerts via Notify-My-Android", "dependencies" : { - "nma" : "0.1.8" + "nma" : "0.2.2" }, "repository" : { "type":"git", @@ -20,5 +20,9 @@ "name": "Dave Conway-Jones", "email": "ceejay@vnet.ibm.com", "url": "http://nodered.org" - } + }, + "contributors": [{ + "name": "Edwin Hermans", + "email": "edwin@madtech.cx" + }] }