From e666d184e8cc62d506e8755f46014d309dd1de55 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 29 May 2020 14:53:56 -0700 Subject: [PATCH] Fixed server crash on user group delete. --- meshuser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshuser.js b/meshuser.js index 9283301d..1755c406 100644 --- a/meshuser.js +++ b/meshuser.js @@ -2034,7 +2034,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use db.Set(xmesh); // Notify mesh change - var event = { etype: 'mesh', userid: user._id, username: user.name, meshid: xmesh._id, name: xmesh.name, mtype: xmesh.mtype, desc: xmesh.desc, action: 'meshchange', links: xmesh.links, msg: 'Removed group ' + group.name + ' from mesh ' + xmesh.name, domain: delGroupDomain.id, invite: mesh.invite }; + var event = { etype: 'mesh', userid: user._id, username: user.name, meshid: xmesh._id, name: xmesh.name, mtype: xmesh.mtype, desc: xmesh.desc, action: 'meshchange', links: xmesh.links, msg: 'Removed group ' + group.name + ' from mesh ' + xmesh.name, domain: delGroupDomain.id }; if (db.changeStream) { event.noact = 1; } // If DB change stream is active, don't use this event to change the mesh. Another event will come. parent.parent.DispatchEvent(parent.CreateMeshDispatchTargets(xmesh, [user._id]), obj, event); }