mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Merge bd2cd3041540baabc0af1be8ab53e7bb7186ff81 into 7562df3035f5c31b78302d5736a798efdf7b965e
This commit is contained in:
commit
bdf78fbdf3
@ -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">
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user