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) {
var n = devicesInMesh[j];
nodecount++;
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));
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));
} 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'); }
@ -2069,7 +2073,6 @@ function serverConnect() {
nodes.push(devicesInMesh[j]);
}
}
console.log(JSON.stringify(nodes, ' ', 2));
} else {
// 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; }
// Change the device group notification
if (user.links == null) { user.links = {}; }
if (user.links[command.meshid]) {
// The user has direct rights for this device group
if (command.notify == 0) {
delete user.links[command.meshid].notify;
} else {