From fff9765940b16ec66c1f8e74dd779fa26e7c35f4 Mon Sep 17 00:00:00 2001 From: Meik Date: Tue, 11 Nov 2025 09:27:48 +0100 Subject: [PATCH] ntfy fix --- services/notificationService.js | 2 +- src/App.js | 2 +- src/components/NotificationPanel.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/notificationService.js b/services/notificationService.js index 729cb28..bbc5d8c 100644 --- a/services/notificationService.js +++ b/services/notificationService.js @@ -28,7 +28,7 @@ async function sendNtfyNotification(adminNtfy, userNtfy, payload) { const server = (userNtfy.serverUrl || adminNtfy.serverUrl || 'https://ntfy.sh').replace(/\/+$/, ''); const sanitizedPrefix = (adminNtfy.topicPrefix || '').replace(/^-+|-+$/g, ''); const sanitizedTopic = (userNtfy.topic || '').replace(/^-+|-+$/g, ''); - const separator = sanitizedPrefix && sanitizedTopic ? '-' : ''; + const separator = sanitizedPrefix && sanitizedTopic ? '_' : ''; const topic = `${sanitizedPrefix}${separator}${sanitizedTopic}` || sanitizedPrefix || sanitizedTopic; let url = `${server}/${topic}`; if (payload.title) { diff --git a/src/App.js b/src/App.js index 8b6985e..3edcd97 100644 --- a/src/App.js +++ b/src/App.js @@ -575,7 +575,7 @@ function App() { return null; } const prefix = (notificationCapabilities.ntfy.topicPrefix || '').replace(/^-+|-+$/g, ''); - const separator = prefix && sanitizedTopic ? '-' : ''; + const separator = prefix && sanitizedTopic ? '_' : ''; const slug = `${prefix}${separator}${sanitizedTopic}` || sanitizedTopic || prefix; if (!slug) { return null; diff --git a/src/components/NotificationPanel.js b/src/components/NotificationPanel.js index c910ce2..7c4e226 100644 --- a/src/components/NotificationPanel.js +++ b/src/components/NotificationPanel.js @@ -79,7 +79,7 @@ const NotificationPanel = ({ )} {capabilities.ntfy.topicPrefix && (

- Präfix: {capabilities.ntfy.topicPrefix} (Bindestrich wird automatisch ergänzt) + Präfix: {capabilities.ntfy.topicPrefix} (Unterstrich wird automatisch ergänzt)

)} {ntfyPreviewUrl && (