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

Fix for incorrect MeshMessenger URL when using a multi-domain server. #2882

This commit is contained in:
Ylian Saint-Hilaire 2021-07-09 15:36:16 -07:00
parent 2a3f55f9fd
commit 913ed9f033
3 changed files with 4 additions and 1 deletions

View file

@ -489,7 +489,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
var agentHttpsPort = ((parent.args.aliasport == null) ? parent.args.port : parent.args.aliasport); // Use HTTPS alias port is specified
if (parent.args.agentport != null) { agentHttpsPort = parent.args.agentport; } // If an agent only port is enabled, use that.
if (parent.args.agentaliasport != null) { agentHttpsPort = parent.args.agentaliasport; } // If an agent alias port is specified, use that.
serverinfo.magenturl = 'mc://' + agentServerName + ((agentHttpsPort != 443)?(':' + agentHttpsPort):'') + ((xdomain != '')?('/' + xdomain):'');
serverinfo.magenturl = 'mc://' + agentServerName + ((agentHttpsPort != 443) ? (':' + agentHttpsPort) : '') + ((xdomain != '') ? ('/' + xdomain) : '');
serverinfo.domainsuffix = xdomain;
if (domain.guestdevicesharing === false) { serverinfo.guestdevicesharing = false; }
if (typeof domain.userconsentflags == 'number') { serverinfo.consent = domain.userconsentflags; }