diff --git a/public/scripts/meshcentral.js b/public/scripts/meshcentral.js index 08188510..a09ca2ce 100644 --- a/public/scripts/meshcentral.js +++ b/public/scripts/meshcentral.js @@ -53,7 +53,7 @@ var MeshServerCreateControl = function (domain, authCookie) { obj.send = function (x) { if (obj.socket != null && obj.connectstate == 1) { - if (obj.trace) { console.log('SEND', x); } + if (obj.trace && (x.action != 'ping')) { console.log('SEND', x); } obj.socket.send(JSON.stringify(x)); } } diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 34f4353a..a5b95d05 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -915,6 +915,10 @@ ugroup.links = message.event.links; } //masterUpdate(8192 + 16384); + + // Group update, refresh all our device groups and nodes. TODO: Optimize this to only do this when needed. + meshserver.send({ action: 'meshes' }); + meshserver.send({ action: 'nodes' }); break; } case 'deleteusergroup': { @@ -954,7 +958,7 @@ meshes[message.event.meshid].links = message.event.links; // Check if we lost rights to this mesh in this change. - if (meshes[message.event.meshid].links[userinfo._id] == null) { + if (IsMeshViewable(message.event.meshid) == false) { if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2); delete meshes[message.event.meshid]; diff --git a/views/default.handlebars b/views/default.handlebars index 0407f318..ea8ed411 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2238,6 +2238,10 @@ if (message.event.links) { ugroup.links = message.event.links; } else { delete ugroup.links; } } masterUpdate(8192 + 16384); + + // Group update, refresh all our device groups and nodes. TODO: Optimize this to only do this when needed. + meshserver.send({ action: 'meshes' }); + meshserver.send({ action: 'nodes' }); break; } case 'deleteusergroup': {