mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 22:17:31 +03:00
Fix for incorrect MeshMessenger URL when using a multi-domain server. #2882
This commit is contained in:
parent
2a3f55f9fd
commit
913ed9f033
@ -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; }
|
||||
|
@ -3694,6 +3694,7 @@
|
||||
if (xxdialogMode) return;
|
||||
setDialogMode(2, "Device Action", 3, function () {
|
||||
var url = '/messenger?id=meshmessenger/' + encodeURIComponentEx(currentNode._id) + '/' + encodeURIComponentEx(userinfo._id) + '&title=' + currentNode.name;
|
||||
if (serverinfo.domainsuffix != '') { url = '/' + serverinfo.domainsuffix + url; }
|
||||
if ((authCookie != null) && (authCookie != '')) { url += '&auth=' + authCookie; }
|
||||
if (e && (e.shiftKey == true)) {
|
||||
safeNewWindow(url, 'meshmessenger:' + currentNode._id);
|
||||
|
@ -6913,6 +6913,7 @@
|
||||
function deviceChat(e) {
|
||||
if (xxdialogMode) return;
|
||||
var url = '/messenger?id=meshmessenger/' + encodeURIComponentEx(currentNode._id) + '/' + encodeURIComponentEx(userinfo._id) + '&title=' + currentNode.name;
|
||||
if (serverinfo.domainsuffix != '') { url = '/' + serverinfo.domainsuffix + url; }
|
||||
if ((authCookie != null) && (authCookie != '')) { url += '&auth=' + authCookie; }
|
||||
if ((currentNode.pmt == 1) && ((features2 & 2) != 0)) { url += '&pmt=1'; } // Push messaging is possible for this device
|
||||
if (e && (e.shiftKey == true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user