@@ -37,9 +41,7 @@
@@ -49,6 +51,7 @@
defaults: {
title: {value:""},
priority: {value:0,required:true,validate:RED.validators.number()},
+ url: {value:""},
name: {value:""}
},
credentials: {
diff --git a/social/prowl/57-prowl.js b/social/prowl/57-prowl.js
index 5d48d37a..e0fbd8de 100644
--- a/social/prowl/57-prowl.js
+++ b/social/prowl/57-prowl.js
@@ -42,13 +42,16 @@ module.exports = function(RED) {
this.on("input",function(msg) {
var titl = this.title||msg.topic||"Node-RED";
var pri = msg.priority||this.priority;
+ var url = this.url||msg.url;
+ var options = { priority:pri };
+ if (url) { options.url = url };
if (typeof(msg.payload) === 'object') {
msg.payload = JSON.stringify(msg.payload);
}
else { msg.payload = msg.payload.toString(); }
if (node.pushkey) {
try {
- node.prowl.push(msg.payload, titl, { priority: pri }, function(err, remaining) {
+ node.prowl.push(msg.payload, titl, options, function(err, remaining) {
if (err) { node.error(err); }
node.log( remaining + ' calls to Prowl api during current hour.' );
});
diff --git a/social/prowl/README.md b/social/prowl/README.md
index 4736bbd5..22136432 100644
--- a/social/prowl/README.md
+++ b/social/prowl/README.md
@@ -18,6 +18,6 @@ Uses Prowl to push the **msg.payload** to an Apple device that has the prowl app
Optionally uses **msg.topic** to set the title. You can also set **msg.priority** to confgure the urgency from -2 (low), through 0 (normal) to 2 (urgent).
-The API Key is stored in a separate credentials file.
+You may use **msg.url** to set a url to redirect the user to on receipt of the message if you don't set one in the edit dialogue.
Uses Prowl. See this link for more details.
diff --git a/social/prowl/package.json b/social/prowl/package.json
index 8c130624..68253838 100644
--- a/social/prowl/package.json
+++ b/social/prowl/package.json
@@ -1,6 +1,6 @@
{
"name" : "node-red-node-prowl",
- "version" : "0.0.4",
+ "version" : "0.0.5",
"description" : "A Node-RED node to send alerts via Prowl",
"dependencies" : {
"node-prowl" : "0.1.7"