Skip to content

Commit 3f43e62

Browse files
authored
Pushover: Allow for optional html formatting in message (#465)
* [Pushover trigger] - Allow for optional HTML message formatting
1 parent b3dce59 commit 3f43e62

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

app/triggers/providers/pushover/Pushover.js

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Pushover extends Trigger {
1414
user: this.joi.string().required(),
1515
token: this.joi.string().required(),
1616
device: this.joi.string(),
17+
html: this.joi.number().valid(0, 1).default(0),
1718
sound: this.joi.string().allow(
1819
'alien',
1920
'bike',
@@ -95,6 +96,7 @@ class Pushover extends Trigger {
9596
sound: this.configuration.sound,
9697
device: this.configuration.device,
9798
priority: this.configuration.priority,
99+
html: this.configuration.html,
98100
};
99101

100102
// Emergency priority needs retry/expire props

docs/configuration/triggers/pushover/README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ The `pushover` trigger lets you send realtime notifications to your devices (And
55

66
### Variables
77

8-
| Env var | Required | Description | Supported values | Default value when missing |
9-
|------------------------------------------------|:--------------:|-----------------------------------------------------------| -------------------------------------------------------------------------------------------------- |-----------------------------|
10-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_TOKEN` | :red_circle: | The API token | | |
11-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_USER` | :red_circle: | The User key | | |
12-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_DEVICE` | :white_circle: | The Device(s) to notify | Coma separated list of devices (e.g. dev1,dev2) ([see here](https://pushover.net/api#identifiers)) | |
13-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_SOUND` | :white_circle: | The notification sound | [see here](https://pushover.net/api#sounds) | `pushover` |
14-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_PRIORITY` | :white_circle: | The notification priority | [see here](https://pushover.net/api#priority) | `0` |
15-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_EXPIRE` | :white_circle: | The notification expire in seconds (only when priority=2) | [see here](https://pushover.net/api#priority) | |
16-
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_RETRY` | :white_circle: | The notification retry in seconds (only when priority=2) | [see here](https://pushover.net/api#priority) | |
8+
| Env var | Required | Description | Supported values | Default value when missing |
9+
|------------------------------------------------|:--------------:|----------------------------------------------------------------------| -------------------------------------------------------------------------------------------------- |-----------------------------|
10+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_TOKEN` | :red_circle: | The API token | | |
11+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_USER` | :red_circle: | The User key | | |
12+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_DEVICE` | :white_circle: | The Device(s) to notify | Coma separated list of devices (e.g. dev1,dev2) ([see here](https://pushover.net/api#identifiers)) | |
13+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_SOUND` | :white_circle: | The notification sound | [see here](https://pushover.net/api#sounds) | `pushover` |
14+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_PRIORITY` | :white_circle: | The notification priority | [see here](https://pushover.net/api#priority) | `0` |
15+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_EXPIRE` | :white_circle: | The notification expire in seconds (only when priority=2) | [see here](https://pushover.net/api#priority) | |
16+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_RETRY` | :white_circle: | The notification retry in seconds (only when priority=2) | [see here](https://pushover.net/api#priority) | |
17+
| `WUD_TRIGGER_PUSHOVER_{trigger_name}_HTML` | :white_circle: | Allow HTML formatting in message body (supported in Pushover 2.3+) | [see here](https://pushover.net/api#html) | `0` |
18+
1719

1820
?> This trigger also supports the [common configuration variables](configuration/triggers/?id=common-trigger-configuration).
1921

0 commit comments

Comments
 (0)