mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-26 16:06:33 +03:00
Fix for server crash when adding device group notification, #3498
This commit is contained in:
parent
5adab4a366
commit
5d6d704d2c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user