[PR #5193] [CLOSED] Add ntfy.sh as notification provider #4458

Closed
opened 2026-04-25 00:50:59 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/5193
Author: @mikkelmi2
Created: 4/15/2026
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • 9391a94 Add ntfy.sh as notification provider alongside Apprise

📊 Changes

8 files changed (+150 additions, -36 deletions)

View changed files

📝 client/components/cards/NotificationCard.vue (+1 -1)
📝 client/components/modals/notification/NotificationEditModal.vue (+33 -10)
📝 client/pages/config/notifications.vue (+34 -11)
📝 client/strings/en-us.json (+6 -0)
📝 server/controllers/NotificationController.js (+1 -1)
📝 server/managers/NotificationManager.js (+32 -2)
📝 server/objects/Notification.js (+14 -2)
📝 server/objects/settings/NotificationSettings.js (+29 -9)

📄 Description

Summary

  • Add ntfy.sh as an alternative notification provider alongside the existing Apprise integration
  • Each notification can be configured to use either Apprise or ntfy via a provider dropdown in the create/edit modal
  • Supports self-hosted ntfy servers and optional token-based authentication
  • No new dependencies — uses the existing axios library

Motivation

While Apprise supports ntfy as one of its many backends, it requires running a separate Apprise API server as a middleman. With native ntfy support, users can send notifications directly to ntfy.sh (or a self-hosted instance) with just a topic name — no additional infrastructure needed.

Changes

Server:

  • NotificationSettings: Add ntfyUrl and ntfyToken fields, update isUseable to check either provider, add undefined guards in update() to prevent partial PATCH from resetting unrelated fields
  • Notification: Add ntfyTopic field and getNtfyPayload() method
  • NotificationManager: Route to Apprise or ntfy based on ntfyTopic presence, add null guard for appriseApiUrl
  • NotificationController: Update error message to be provider-agnostic

Client:

  • Add ntfy.sh settings section (server URL with placeholder, auth token) on the notifications config page
  • Add provider dropdown (Apprise / ntfy.sh) in the notification edit modal
  • Extract shared saveSettings() helper to deduplicate form submissions
  • All user-visible strings use i18n (en-us.json only — other locales fall back to English)

Test plan

  • Existing Apprise notifications still work
  • Create and test an ntfy notification
  • Saving one provider's settings does not clear the other

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/5193 **Author:** [@mikkelmi2](https://github.com/mikkelmi2) **Created:** 4/15/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`9391a94`](https://github.com/advplyr/audiobookshelf/commit/9391a940f520cab69192bdc88fe59fb0a022748b) Add ntfy.sh as notification provider alongside Apprise ### 📊 Changes **8 files changed** (+150 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `client/components/cards/NotificationCard.vue` (+1 -1) 📝 `client/components/modals/notification/NotificationEditModal.vue` (+33 -10) 📝 `client/pages/config/notifications.vue` (+34 -11) 📝 `client/strings/en-us.json` (+6 -0) 📝 `server/controllers/NotificationController.js` (+1 -1) 📝 `server/managers/NotificationManager.js` (+32 -2) 📝 `server/objects/Notification.js` (+14 -2) 📝 `server/objects/settings/NotificationSettings.js` (+29 -9) </details> ### 📄 Description ## Summary - Add [ntfy.sh](https://ntfy.sh) as an alternative notification provider alongside the existing Apprise integration - Each notification can be configured to use either Apprise or ntfy via a provider dropdown in the create/edit modal - Supports self-hosted ntfy servers and optional token-based authentication - No new dependencies — uses the existing axios library ## Motivation While Apprise supports ntfy as one of its many backends, it requires running a separate Apprise API server as a middleman. With native ntfy support, users can send notifications directly to ntfy.sh (or a self-hosted instance) with just a topic name — no additional infrastructure needed. ## Changes **Server:** - `NotificationSettings`: Add `ntfyUrl` and `ntfyToken` fields, update `isUseable` to check either provider, add `undefined` guards in `update()` to prevent partial PATCH from resetting unrelated fields - `Notification`: Add `ntfyTopic` field and `getNtfyPayload()` method - `NotificationManager`: Route to Apprise or ntfy based on `ntfyTopic` presence, add null guard for `appriseApiUrl` - `NotificationController`: Update error message to be provider-agnostic **Client:** - Add ntfy.sh settings section (server URL with placeholder, auth token) on the notifications config page - Add provider dropdown (Apprise / ntfy.sh) in the notification edit modal - Extract shared `saveSettings()` helper to deduplicate form submissions - All user-visible strings use i18n (en-us.json only — other locales fall back to English) ## Test plan - [ ] Existing Apprise notifications still work - [ ] Create and test an ntfy notification - [ ] Saving one provider's settings does not clear the other --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:50:59 +02:00
adam closed this issue 2026-04-25 00:51:00 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4458