Fixed retry and expire required for Pushover priority 2

This commit is contained in:
Mark van Renswoude 2021-08-18 19:04:01 +02:00
parent 1d1d5ab26f
commit 2c21a13e03
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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}`);