Skip to content

Commit

Permalink
Add url to pushover notification (#5055)
Browse files Browse the repository at this point in the history
Co-authored-by: Frank Elsinga <frank@elsinga.de>
  • Loading branch information
aizatto and CommanderStorm authored Aug 28, 2024
1 parent b059c19 commit 01210ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/notification-providers/pushover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const { getMonitorRelativeURL } = require("../../src/util");
const { setting } = require("../util-server");

const NotificationProvider = require("./notification-provider");
const axios = require("axios");

Expand All @@ -23,6 +26,12 @@ class Pushover extends NotificationProvider {
"html": 1,
};

const baseURL = await setting("primaryBaseURL");
if (baseURL && monitorJSON) {
data["url"] = baseURL + getMonitorRelativeURL(monitorJSON.id);
data["url_title"] = "Link to Monitor";
}

if (notification.pushoverdevice) {
data.device = notification.pushoverdevice;
}
Expand Down

0 comments on commit 01210ce

Please sign in to comment.