diff --git a/server/notification.js b/server/notification.js index 0e963a128..f53b681a1 100644 --- a/server/notification.js +++ b/server/notification.js @@ -137,6 +137,24 @@ class Notification { throwGeneralAxiosError(error) } + } else if (notification.type === "pushy") { + try { + await axios.post(`https://api.pushy.me/push?api_key=${notification.pushyAPIKey}`, { + "to": notification.pushyToken, + "data": { + "message": "Uptime-Kuma" + }, + "notification": { + "body": msg, + "badge": 1, + "sound": "ping.aiff" + } + }) + return true; + } catch (error) { + console.log(error) + return false; + } } else if (notification.type === "slack") { try { if (heartbeatJSON == null) { diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 4af1ffa57..4eea85d66 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -21,6 +21,7 @@ + @@ -229,6 +230,23 @@ + +