Skip to content

Commit 6ca7097

Browse files
authored
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
1 parent 96fa500 commit 6ca7097

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

social/pushover/57-pushover.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<p><code>msg.sound</code>: set the notification sound, <i><a href="https://pushover.net/api#sounds" target="_new">see the available options</a></i></p>
8787
<p><code>msg.retry</code>: set retry interval for Emergency priority (2) messages, <i><a href="https://pushover.net/api#priority" target="_new">see details</a></i></p>
8888
<p><code>msg.expire</code>: set retry duration for Emergency priority (2) messages, <i><a href="https://pushover.net/api#priority" target="_new">see details</a></i></p>
89+
<p><code>msg.callback</code>: set the callback url for Emergency priority (2) messages, <i><a href="https://pushover.net/api/receipts#callback" target="_new">see details</a></i></p>
8990
<p>Uses Pushover. See <i><a href="https://pushover.net" target="_new">this link</a></i> for more details.</p>
9091
</script>
9192

social/pushover/57-pushover.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = function(RED) {
4141
var attachment = msg.attachment || null;
4242
var retry = msg.retry || 30;
4343
var expire = msg.expire || 600;
44+
var callback = msg.callback || null;
4445
if (isNaN(pri)) {pri=0;}
4546
if (pri > 2) {pri = 2;}
4647
if (pri < -2) {pri = -2;}
@@ -78,6 +79,7 @@ module.exports = function(RED) {
7879
if (typeof(sound) === 'string') { pushmsg.sound = sound; }
7980
if (typeof(url) === 'string') { pushmsg.url = url; }
8081
if (typeof(url_title) === 'string') { pushmsg.url_title = url_title; }
82+
if (typeof(callback) === 'string') { pushmsg.callback = callback; }
8183
if (html) { pushmsg.html = 1; }
8284
if (typeof(attachment) === 'string') {
8385
// Treat attachment as a path

social/pushover/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Optionally uses `msg.topic` to set the configuration, if not already set in the
2828
- `msg.sound`: to set the alert sound, see the [available options](https://pushover.net/api#sounds)
2929
- `msg.retry`: to set retry interval for Emergency priority (2) messages, see [priority](https://pushover.net/api#priority)
3030
- `msg.expire`: to set retry duration for Emergency priority (2) messages, see [priority](https://pushover.net/api#priority)
31+
- `msg.callback`: to set callback url for Emergency priority (2) messages, see [callback](https://pushover.net/api/receipts#callback)
3132

3233
The User-key and API-token are stored in a separate credentials file.
3334

0 commit comments

Comments
 (0)