From 4b6c5f38bd2a9fadadb93bfc38ec5fa172f84514 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 4 Feb 2022 10:45:20 -0800 Subject: [PATCH] Empty URL will not open chat window, #3575 --- views/default.handlebars | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index fa84aa1f..ae0664e2 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -7411,8 +7411,8 @@ var url = serverinfo.altmessenging[i].url.split('{0}').join(currentNode._id.split('/').join('-')); var localurl = url; if (typeof serverinfo.altmessenging[i].localurl == 'string') { localurl = serverinfo.altmessenging[i].localurl.split('{0}').join(currentNode._id.split('/').join('-')); } - meshserver.send({ action: 'msg', type: 'openUrl', nodeid: currentNode._id, url: url }); - safeNewWindow(localurl, 'altmessenger:' + currentNode._id, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=560'); + if (url != '') { meshserver.send({ action: 'msg', type: 'openUrl', nodeid: currentNode._id, url: url }); } + if (localurl != '') { safeNewWindow(localurl, 'altmessenger:' + currentNode._id, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=560'); } } function deviceToggleBackground() {