From 53e203d2f9f544d150ef033dbf54e0b7c10d2860 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 14 Jul 2021 21:56:38 +0200 Subject: [PATCH 1/2] 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 ffd030cb0..8c7e9f5e9 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 d08cb5019..6ee36b286 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() From 25a93b05dc2b9a98ee39dd20b05dbb4f703aeddc Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 14 Jul 2021 22:00:15 +0200 Subject: [PATCH 2/2] =?UTF-8?q?easier=20merging=20=F0=9F=A4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NotificationDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 6ee36b286..73354f2cd 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -260,7 +260,7 @@ export default { this.id = null; this.notification = { name: "", - type: null + type: null, } // Default set to Telegram