Skip to content

Commit

Permalink
Better handling for old added ntfy notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam committed Apr 25, 2023
1 parent 8207f16 commit 078d1f9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/notifications/Ntfy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ export default {
if (typeof this.$parent.notification.ntfyPriority === "undefined") {
this.$parent.notification.ntfyserverurl = "https://ntfy.sh";
this.$parent.notification.ntfyPriority = 5;
this.$parent.notification.ntfyAuthenticationMethod = "none";
}
// Handling notifications that added before 1.22.0
if (typeof this.$parent.notification.ntfyAuthenticationMethod === "undefined") {
if (!this.$parent.notification.ntfyusername) {
this.$parent.notification.ntfyAuthenticationMethod = "none";
} else {
this.$parent.notification.ntfyAuthenticationMethod = "usernamePassword";
}
}
},
};
Expand Down

0 comments on commit 078d1f9

Please sign in to comment.