mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added browser notification support to MeshMessenger
This commit is contained in:
parent
77df924926
commit
f1f4c02c68
7 changed files with 53 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue