From 2517d0f62daca2089e7cada8d9aba14ba32d8801 Mon Sep 17 00:00:00 2001 From: Scott Bender Date: Tue, 11 Mar 2025 09:53:56 -0400 Subject: [PATCH] fix: don't prepend "notifications." to path if already there --- signalk-send-notification.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/signalk-send-notification.js b/signalk-send-notification.js index 95719c4..c5e43a3 100644 --- a/signalk-send-notification.js +++ b/signalk-send-notification.js @@ -41,6 +41,10 @@ module.exports = function(RED) { if ( typeof source !== 'undefined' && source.length === 0 ) { source = undefined } + + if ( !path.startsWith('notifications.') ) { + path = 'notifications.' + path + } let delta = { updates: [ @@ -48,7 +52,7 @@ module.exports = function(RED) { $source: source, values: [ { - path: 'notifications.' + path, + path, value: { state: state, method: method,