mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-09 05:34:54 -05:00
Added browser notification support to MeshMessenger
This commit is contained in:
@@ -2847,7 +2847,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
var smesh = command.meshid.split('/');
|
||||
if ((smesh.length != 3) || (smesh[0] != 'mesh') || (smesh[1] != domain.id)) { err = 'Invalid group id'; }
|
||||
var serverName = parent.getWebServerName(domain);
|
||||
if (parent.args.lanonly == true) { err = 'Server has not fixed IP or DNS name.'; }
|
||||
|
||||
// Handle any errors
|
||||
if (err != null) {
|
||||
@@ -2865,6 +2864,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
var xdomain = (domain.dns == null) ? domain.id : '';
|
||||
if (xdomain != '') xdomain += "/";
|
||||
var url = "http" + (args.notls ? '' : 's') + "://" + serverName + ":" + httpsPort + "/" + xdomain + "agentinvite?c=" + inviteCookie;
|
||||
if (serverName.split('.') == 1) { url = "/" + xdomain + "agentinvite?c=" + inviteCookie; }
|
||||
|
||||
ws.send(JSON.stringify({ action: 'createInviteLink', meshid: command.meshid, url: url, expire: command.expire, cookie: inviteCookie, responseid: command.responseid, tag: command.tag }));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user