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,
|
token: token,
|
||||||
title: parsedSubject.title,
|
title: parsedSubject.title,
|
||||||
message: message,
|
message: message,
|
||||||
priority: priority,
|
priority: Number(priority) || 0,
|
||||||
sound: parsedSubject.sound,
|
sound: parsedSubject.sound,
|
||||||
timestamp: this.dateTimeProvider.unixTimestamp(),
|
timestamp: this.dateTimeProvider.unixTimestamp(),
|
||||||
url: new URL('/#/n/' + token, this.publicUrl).href
|
url: new URL('/#/n/' + token, this.publicUrl).href
|
||||||
|
@ -20,6 +20,12 @@ class PushoverTransport
|
|||||||
if (notification.sound)
|
if (notification.sound)
|
||||||
data.sound = 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);
|
const response = await axios.post("https://api.pushover.net/1/messages.json", data);
|
||||||
logger.verbose(`Pushover API returned status code ${response.status}`);
|
logger.verbose(`Pushover API returned status code ${response.status}`);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user