From e5d75fbd9b58be748e093a0365131e8541c02d58 Mon Sep 17 00:00:00 2001 From: Edwin Hermans Date: Fri, 12 Dec 2014 00:57:01 +0100 Subject: [PATCH 1/3] Update package.json --- social/nma/package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/social/nma/package.json b/social/nma/package.json index 7004dd69..c8ccd65e 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" + }] } From 24282291f455fcdc4a1a4451602a477a58b002fb Mon Sep 17 00:00:00 2001 From: Edwin Hermans Date: Fri, 12 Dec 2014 01:01:18 +0100 Subject: [PATCH 2/3] updates for new version of nma package --- social/nma/57-nma.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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."); From 3b6f0ae2223559fcddf171bd87162c923b2e4d22 Mon Sep 17 00:00:00 2001 From: Edwin Hermans Date: Fri, 12 Dec 2014 10:36:15 +0100 Subject: [PATCH 3/3] pinned version of nma dependency --- social/nma/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/social/nma/package.json b/social/nma/package.json index c8ccd65e..07932d16 100644 --- a/social/nma/package.json +++ b/social/nma/package.json @@ -3,7 +3,7 @@ "version" : "0.0.2", "description" : "A Node-RED node to send alerts via Notify-My-Android", "dependencies" : { - "nma" : ">=0.2.2" + "nma" : "0.2.2" }, "repository" : { "type":"git",