From 3a6947b4838cd177fc70c4001700655089403eb4 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 2 Jul 2021 13:09:38 -0700 Subject: [PATCH] Fix for 2851. Added user account link. --- meshrelay.js | 5 +---- views/default.handlebars | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/meshrelay.js b/meshrelay.js index 950e1e13..5e69c3c5 100644 --- a/meshrelay.js +++ b/meshrelay.js @@ -1188,10 +1188,7 @@ function CreateLocalRelayEx(parent, ws, req, domain, user, cookie) { ws.flushSink = function () { try { ws._socket.resume(); } catch (ex) { console.log(ex); } }; // When data is received from the mesh relay web socket - ws.on('message', function (data) { - if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } } - else { console.log("RelayString: " + data); } - }); // Perform relay + ws.on('message', function (data) { if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } } }); // Perform relay // If error, close both sides of the relay. ws.on('error', function (err) { parent.relaySessionErrorCount++; obj.close(); }); diff --git a/views/default.handlebars b/views/default.handlebars index c956d07f..1545c756 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -1446,9 +1446,10 @@ // Setup logout control var logoutControl = ''; - if (logoutControls) - if (logoutControls.name != null) { logoutControl = format("Welcome {0}.", logoutControls.name); } - if (logoutControls.logoutUrl != null) { logoutControl += format(' ' + "Logout" + ''); } + if (logoutControls) { + if (logoutControls.name != null) { logoutControl = ('' + format("Welcome {0}.", logoutControls.name) + ''); } + if (logoutControls.logoutUrl != null) { logoutControl += format(' ' + "Logout" + ''); } + } if (args.hide & 1) { QH('logoutControlSpan2', logoutControl); } else { QH('logoutControlSpan', logoutControl); } // Setup the context menu