added option for ntfy access tokens

This commit is contained in:
Josua Frank
2023-03-08 13:28:02 +00:00
parent 2dedc1cfbd
commit e8814e8479
2 changed files with 10 additions and 0 deletions

View File

@@ -13,6 +13,10 @@ class Ntfy extends NotificationProvider {
headers = {
"Authorization": "Basic " + Buffer.from(notification.ntfyusername + ":" + notification.ntfypassword).toString("base64"),
};
} else if (notification.ntfyaccesstoken) {
headers = {
"Authorization": "Bearer " + notification.ntfyaccesstoken,
};
}
let data = {
"topic": notification.ntfytopic,