diff --git a/server/notification.js b/server/notification.js index cce21e7ed..db4aec1f6 100644 --- a/server/notification.js +++ b/server/notification.js @@ -49,6 +49,25 @@ class Notification { return false; } + } 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 5dc4b4c89..d6aed1f4b 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -21,6 +21,7 @@ + @@ -221,6 +222,23 @@ More info on: https://pushover.net/api

+ +