Rework lunasea notification to allow for device id and user id

This commit is contained in:
Bobby Ore
2023-02-28 09:47:35 -06:00
parent 48b637d4c8
commit b21c2adcc2
2 changed files with 23 additions and 8 deletions

View File

@@ -9,8 +9,8 @@ class LunaSea extends NotificationProvider {
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully.";
let lunaseaurl = "";
if (notification.lunaseaNotificationType === "user") {
lunaseaurl = "https://notify.lunasea.app/v1/custom/user/" + notification.lunaseaDevice;
if (notification.lunaseaTarget === "user") {
lunaseaurl = "https://notify.lunasea.app/v1/custom/user/" + notification.lunaseaUserID;
} else {
lunaseaurl = "https://notify.lunasea.app/v1/custom/device/" + notification.lunaseaDevice;
}