diff --git a/server/notification-providers/pushover.js b/server/notification-providers/pushover.js
index 8422b64c2..260b7e3b3 100644
--- a/server/notification-providers/pushover.js
+++ b/server/notification-providers/pushover.js
@@ -1,5 +1,6 @@
const { getMonitorRelativeURL } = require("../../src/util");
const { setting } = require("../util-server");
+const { UP, DOWN } = require("../../src/util");
const NotificationProvider = require("./notification-provider");
const axios = require("axios");
@@ -43,15 +44,19 @@ class Pushover extends NotificationProvider {
if (heartbeatJSON == null) {
await axios.post(url, data);
return okMsg;
- } else {
- data.message += `\nTime (${heartbeatJSON["timezone"]}):${heartbeatJSON["localDateTime"]}`;
- await axios.post(url, data);
- return okMsg;
}
+
+ if (heartbeatJSON.status === UP) {
+ data.sound = notification.pushoversounds_up;
+ }
+
+ data.message += `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`;
+ await axios.post(url, data);
+ return okMsg;
+
} catch (error) {
this.throwGeneralAxiosError(error);
}
-
}
}