From 53e203d2f9f544d150ef033dbf54e0b7c10d2860 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 14 Jul 2021 21:56:38 +0200 Subject: [PATCH] add gotify priority ref https://github.com/louislam/uptime-kuma/pull/43 closes https://github.com/louislam/uptime-kuma/issues/50 --- server/notification.js | 2 +- src/components/NotificationDialog.vue | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/server/notification.js b/server/notification.js index ffd030cb..8c7e9f5e 100644 --- a/server/notification.js +++ b/server/notification.js @@ -26,7 +26,7 @@ class Notification { } await axios.post(`${notification.gotifyserverurl}/message?token=${notification.gotifyapplicationToken}`, { "message": msg, - "priority": 8, + "priority": notification.gotifyPriority || 8, "title": "Uptime-Kuma" }) return true; diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index d08cb501..6ee36b28 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -182,6 +182,11 @@ + +
+ + +
@@ -220,6 +225,7 @@ export default { notification: { name: "", type: null, + gotifyPriority: 8 }, } }, @@ -254,11 +260,12 @@ export default { this.id = null; this.notification = { name: "", - type: null, + type: null } - + // Default set to Telegram this.notification.type = "telegram" + this.notification.gotifyPriority = 8 } this.modal.show()