From b21c2adcc2ec7808e0e8688ef6f25702f0af5c6a Mon Sep 17 00:00:00 2001 From: Bobby Ore Date: Tue, 28 Feb 2023 09:47:35 -0600 Subject: [PATCH] Rework lunasea notification to allow for device id and user id --- server/notification-providers/lunasea.js | 4 ++-- src/components/notifications/LunaSea.vue | 27 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/server/notification-providers/lunasea.js b/server/notification-providers/lunasea.js index 3df6fe1aa..4d7136f75 100644 --- a/server/notification-providers/lunasea.js +++ b/server/notification-providers/lunasea.js @@ -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; } diff --git a/src/components/notifications/LunaSea.vue b/src/components/notifications/LunaSea.vue index 230e3b0d3..1ee4a8a51 100644 --- a/src/components/notifications/LunaSea.vue +++ b/src/components/notifications/LunaSea.vue @@ -1,18 +1,33 @@ + +