This commit is contained in:
JSuenram 2022-01-21 10:52:32 +01:00
commit 9d023b8e09
2 changed files with 7 additions and 2 deletions

View File

@ -2048,7 +2048,11 @@ function serverConnect() {
for (var j in devicesInMesh) { for (var j in devicesInMesh) {
var n = devicesInMesh[j]; var n = devicesInMesh[j];
nodecount++; nodecount++;
if (settings.xmeshes) {
console.log('\"' + settings.xmeshes[i]._id.split('/')[2] + '\",\"' + settings.xmeshes[i].name.split('\"').join('') + '\",\"' + n._id.split('/')[2] + '\",\"' + n.name.split('\"').join('') + '\",' + (n.icon ? n.icon : 0) + ',' + (n.conn ? n.conn : 0) + ',' + (n.pwr ? n.pwr : 0)); console.log('\"' + settings.xmeshes[i]._id.split('/')[2] + '\",\"' + settings.xmeshes[i].name.split('\"').join('') + '\",\"' + n._id.split('/')[2] + '\",\"' + n.name.split('\"').join('') + '\",' + (n.icon ? n.icon : 0) + ',' + (n.conn ? n.conn : 0) + ',' + (n.pwr ? n.pwr : 0));
} else {
console.log('\"' + n._id.split('/')[2] + '\",\"' + n.name.split('\"').join('') + '\",' + (n.icon ? n.icon : 0) + ',' + (n.conn ? n.conn : 0) + ',' + (n.pwr ? n.pwr : 0));
}
} }
} }
if (nodecount == 0) { console.log('None'); } if (nodecount == 0) { console.log('None'); }
@ -2069,7 +2073,6 @@ function serverConnect() {
nodes.push(devicesInMesh[j]); nodes.push(devicesInMesh[j]);
} }
} }
console.log(JSON.stringify(nodes, ' ', 2)); console.log(JSON.stringify(nodes, ' ', 2));
} else { } else {
// Display the list of nodes in text format // Display the list of nodes in text format

View File

@ -1592,7 +1592,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
if (err != null) { if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'changemeshnotify', responseid: command.responseid, result: err })); } catch (ex) { } } break; } if (err != null) { if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'changemeshnotify', responseid: command.responseid, result: err })); } catch (ex) { } } break; }
// Change the device group notification // Change the device group notification
if (user.links == null) { user.links = {}; }
if (user.links[command.meshid]) { if (user.links[command.meshid]) {
// The user has direct rights for this device group
if (command.notify == 0) { if (command.notify == 0) {
delete user.links[command.meshid].notify; delete user.links[command.meshid].notify;
} else { } else {