Skip to content

Commit

Permalink
Merge pull request #52 from philippdormann/feature/gotify-upstream-merge
Browse files Browse the repository at this point in the history
customize Gotify priority
  • Loading branch information
louislam authored Jul 15, 2021
2 parents 275f77d + 25a93b0 commit 91b736f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 8 additions & 1 deletion src/components/NotificationDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@
<input type="text" class="form-control" id="gotify-server-url" required v-model="notification.gotifyserverurl">
</div>
</div>

<div class="mb-3">
<label for="gotify-priority" class="form-label">Priority</label>
<input type="number" class="form-control" id="gotify-priority" v-model="notification.gotifyPriority" required min="0" max="10" step="1">
</div>
</template>

</div>
Expand Down Expand Up @@ -220,6 +225,7 @@ export default {
notification: {
name: "",
type: null,
gotifyPriority: 8
},
}
},
Expand Down Expand Up @@ -256,9 +262,10 @@ export default {
name: "",
type: null,
}
// Default set to Telegram
this.notification.type = "telegram"
this.notification.gotifyPriority = 8
}
this.modal.show()
Expand Down

0 comments on commit 91b736f

Please sign in to comment.