1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved MongoDB change stream.

This commit is contained in:
Ylian Saint-Hilaire 2019-05-29 14:36:14 -07:00
parent 88b0b8601c
commit bbd0f5efda
6 changed files with 76 additions and 29 deletions

View file

@ -881,6 +881,7 @@
case 'addnode': {
var node = message.event.node;
if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
if (getNodeFromId(node._id) != null) break; // This node is already known.
node.namel = node.name.toLowerCase();
if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
node.meshnamel = meshes[node.meshid].name.toLowerCase();