ntfy fix
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user