Make all guac messages fire an event as opposed to unhandled ones, to make scripting easier
This commit is contained in:
parent
d5bd23d5db
commit
65ac88f771
1 changed files with 1 additions and 3 deletions
|
@ -120,6 +120,7 @@ class CollabVMClient {
|
||||||
}
|
}
|
||||||
async #onMessage(event) {
|
async #onMessage(event) {
|
||||||
var msgArr = guacutils.decode(event.data);
|
var msgArr = guacutils.decode(event.data);
|
||||||
|
window.cvmEvents.emit(msgArr[0], msgArr.slice(1));
|
||||||
switch (msgArr[0]) {
|
switch (msgArr[0]) {
|
||||||
case "nop":
|
case "nop":
|
||||||
this.socket.send("3.nop;");
|
this.socket.send("3.nop;");
|
||||||
|
@ -365,9 +366,6 @@ class CollabVMClient {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
window.cvmEvents.emit(msgArr[0], msgArr.slice(1));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reloadUsers() {
|
reloadUsers() {
|
||||||
|
|
Loading…
Reference in a new issue