From 5d6d704d2cc673e1666fb0598fe7abc6ee932e44 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 20 Jan 2022 17:56:20 -0800 Subject: [PATCH] Fix for server crash when adding device group notification, #3498 --- meshuser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshuser.js b/meshuser.js index d52a1b4a..e8682d4f 100644 --- a/meshuser.js +++ b/meshuser.js @@ -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 {