diff --git a/src/notification/facade.js b/src/notification/facade.js index e77f9e2..56d9ec1 100644 --- a/src/notification/facade.js +++ b/src/notification/facade.js @@ -41,7 +41,7 @@ class NotificationFacade token: token, title: parsedSubject.title, message: message, - priority: priority, + priority: Number(priority) || 0, sound: parsedSubject.sound, timestamp: this.dateTimeProvider.unixTimestamp(), url: new URL('/#/n/' + token, this.publicUrl).href diff --git a/src/transport/pushover.js b/src/transport/pushover.js index 5f077f9..35b462b 100644 --- a/src/transport/pushover.js +++ b/src/transport/pushover.js @@ -20,6 +20,12 @@ class PushoverTransport if (notification.sound) data.sound = notification.sound; + if (notification.priority === 2) + { + data.retry = 300; + data.expire = 3600; + } + const response = await axios.post("https://api.pushover.net/1/messages.json", data); logger.verbose(`Pushover API returned status code ${response.status}`);