mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-23 04:33:14 -05:00
Added altmessaging localurl option, #3575
This commit is contained in:
parent
ac2bf066c3
commit
4dcf4857c4
@ -360,9 +360,9 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string", "description": "Name of the alternative messaging service, for example: \"Jitsi\" " },
|
||||
"url": { "type": "string", "description": "URL to the alternative messaging services, for example: \"https://meet.jit.si/myserver-{0}\"" }
|
||||
"url": { "type": "string", "description": "URL to the alternative messaging services, for example: \"https://meet.jit.si/myserver-{0}\"" },
|
||||
"localurl": { "type": "string", "description": "If specified, this is the URL that is used on the administrator side, for example: \"https://meet.jit.si/myserver-{0}\"" }
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [ "name", "url" ]
|
||||
},
|
||||
"deviceMeshRouterLinks": {
|
||||
|
@ -540,7 +540,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
}
|
||||
if (matchingDomains.length > 0) { serverinfo.amtAcmFqdn = matchingDomains; }
|
||||
}
|
||||
if ((typeof domain.altmessenging == 'object') && (typeof domain.altmessenging.name == 'string') && (typeof domain.altmessenging.url == 'string')) { serverinfo.altmessenging = [{ name: domain.altmessenging.name, url: domain.altmessenging.url }]; }
|
||||
if ((typeof domain.altmessenging == 'object') && (typeof domain.altmessenging.name == 'string') && (typeof domain.altmessenging.url == 'string')) { serverinfo.altmessenging = [{ name: domain.altmessenging.name, url: domain.altmessenging.url, localurl: domain.altmessenging.localurl }]; }
|
||||
if (typeof domain.devicemeshrouterlinks == 'object') { serverinfo.devicemeshrouterlinks = domain.devicemeshrouterlinks; }
|
||||
if (Array.isArray(domain.altmessenging)) { serverinfo.altmessenging = []; for (var i in domain.altmessenging) { if ((typeof domain.altmessenging[i] == 'object') && (typeof domain.altmessenging[i].name == 'string') && (typeof domain.altmessenging[i].url == 'string')) { serverinfo.altmessenging.push({ name: domain.altmessenging[i].name, url: domain.altmessenging[i].url }); } } }
|
||||
serverinfo.https = true;
|
||||
|
@ -7409,8 +7409,10 @@
|
||||
function altDeviceChat(e, i) {
|
||||
if (xxdialogMode) return;
|
||||
var url = serverinfo.altmessenging[i].url.split('{0}').join(currentNode._id.split('/').join('-'));
|
||||
var localurl = url;
|
||||
if (typeof serverinfo.altmessenging[i].url == 'string') { localurl = serverinfo.altmessenging[i].localurl.split('{0}').join(currentNode._id.split('/').join('-')); }
|
||||
meshserver.send({ action: 'msg', type: 'openUrl', nodeid: currentNode._id, url: url });
|
||||
safeNewWindow(url, 'altmessenger:' + currentNode._id, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=560');
|
||||
safeNewWindow(localurl, 'altmessenger:' + currentNode._id, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=560');
|
||||
}
|
||||
|
||||
function deviceToggleBackground() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user