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

More device session notification work.

This commit is contained in:
Ylian Saint-Hilaire 2020-05-11 18:44:46 -07:00
parent 2ca1817065
commit 6431974136
6 changed files with 97 additions and 11 deletions

View file

@ -1403,6 +1403,7 @@ function createMeshCore(agent) {
if (this.httprequest.desktop.kvm.tunnels != null) {
for (var i in this.httprequest.desktop.kvm.tunnels) { try { var userid = this.httprequest.desktop.kvm.tunnels[i].httprequest.userid; if (users[userid] == null) { users[userid] = 1; } else { users[userid]++; } } catch (ex) { } }
for (var i in this.httprequest.desktop.kvm.tunnels) { try { this.httprequest.desktop.kvm.tunnels[i].write(JSON.stringify({ ctrlChannel: '102938', type: 'metadata', users: users })); } catch (ex) { } }
try { mesh.SendCommand({ action: 'sessions', type: 'kvm', value: users }); } catch (ex) { }
}
this.end = function () {
@ -1417,6 +1418,7 @@ function createMeshCore(agent) {
if (this.httprequest.desktop.kvm.tunnels != null) {
for (var i in this.httprequest.desktop.kvm.tunnels) { try { var userid = this.httprequest.desktop.kvm.tunnels[i].httprequest.userid; if (users[userid] == null) { users[userid] = 1; } else { users[userid]++; } } catch (ex) { } }
for (var i in this.httprequest.desktop.kvm.tunnels) { try { this.httprequest.desktop.kvm.tunnels[i].write(JSON.stringify({ ctrlChannel: '102938', type: 'metadata', users: users })); } catch (ex) { } }
try { mesh.SendCommand({ action: 'sessions', type: 'kvm', value: users }); } catch (ex) { }
}
// Unpipe the web socket