Fixed server crash when adding a device event.

This commit is contained in:
Ylian Saint-Hilaire 2020-01-23 15:51:32 -08:00
parent ae51bd6eec
commit bb8009668e
2 changed files with 3 additions and 3 deletions

View File

@ -2858,8 +2858,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
if (rights == 0) return;
// Add an event for this device
var targets = ['*', 'server-users', user._id, nodes[0].meshid];
var event = { etype: 'node', userid: user._id, username: user.name, nodeid: nodes[0]._id, action: 'manual', msg: decodeURIComponent(command.msg), domain: domain.id };
var targets = ['*', 'server-users', user._id, node.meshid];
var event = { etype: 'node', userid: user._id, username: user.name, nodeid: node._id, action: 'manual', msg: decodeURIComponent(command.msg), domain: domain.id };
parent.parent.DispatchEvent(targets, obj, event);
});
break;

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.7-o",
"version": "0.4.7-p",
"keywords": [
"Remote Management",
"Intel AMT",