Fixed retry and expire required for Pushover priority 2
This commit is contained in:
parent
1d1d5ab26f
commit
2c21a13e03
@ -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
|
||||
|
@ -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}`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user