Social: pushover; add callback parameter w/ documentation (#832)

* adding callback parameter to pushover node.

* pushover: callback feature added

* social/pushover documentation

* PR: added callback parameter to pushover
This commit is contained in:
brianmangan
2021-08-30 04:10:07 -07:00
committed by GitHub
parent 96fa500ad6
commit 6ca70977d8
3 changed files with 4 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ module.exports = function(RED) {
var attachment = msg.attachment || null;
var retry = msg.retry || 30;
var expire = msg.expire || 600;
var callback = msg.callback || null;
if (isNaN(pri)) {pri=0;}
if (pri > 2) {pri = 2;}
if (pri < -2) {pri = -2;}
@@ -78,6 +79,7 @@ module.exports = function(RED) {
if (typeof(sound) === 'string') { pushmsg.sound = sound; }
if (typeof(url) === 'string') { pushmsg.url = url; }
if (typeof(url_title) === 'string') { pushmsg.url_title = url_title; }
if (typeof(callback) === 'string') { pushmsg.callback = callback; }
if (html) { pushmsg.html = 1; }
if (typeof(attachment) === 'string') {
// Treat attachment as a path