add priority -2 to pushover node.

to close #129
This commit is contained in:
Dave Conway-Jones 2015-08-15 20:00:40 +01:00
parent 7562df3035
commit 56ff75a37d
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips" id="node-tip">Tip: Leave title blank to set using <b>msg.topic</b> and <b>msg.priority</b>.<br/>
Only supports priorities 2, 1, 0, and -1.</div>
Supports priorities 2, 1, 0, -1, and -2.</div>
</script>
<script type="text/x-red" data-help-name="pushover">

View File

@ -45,7 +45,7 @@ module.exports = function(RED) {
var pri = this.priority || msg.priority || 0;
if (isNaN(pri)) {pri=0;}
if (pri > 2) {pri = 2;}
if (pri < -1) {pri = -1;}
if (pri < -2) {pri = -2;}
if (typeof(msg.payload) === 'object') {
msg.payload = JSON.stringify(msg.payload);
}
@ -73,6 +73,6 @@ module.exports = function(RED) {
credentials: {
deviceid: {type:"text"},
pushkey: {type: "password"}
}
}
});
}