mike-jumper commented on code in PR #791:
URL: https://github.com/apache/guacamole-client/pull/791#discussion_r1092593724
##########
guacamole-common-js/src/main/webapp/modules/Client.js:
##########
@@ -1416,8 +1450,31 @@ Guacamole.Client = function(tunnel) {
},
"msg" : function(parameters) {
-
- if (guac_client.onmsg) guac_client.onmsg(parseInt(parameters[0]),
parameters.slice(1));
+
+ var userID;
+ var username;
+
+ var msgid = parseInt(parameters[0]);
+ if (guac_client.onmsg)
+ guac_client.onmsg(msgid, parameters.slice(1));
+
+ switch (msgid) {
+
+ case Guacamole.Client.Message.USER_JOINED:
+ userID = parameters[1];
+ username = parameters[2];
+ if (guac_client.onjoin)
+ guac_client.onjoin(userID, username);
+ break;
+
+ case Guacamole.Client.Message.USER_LEFT:
+ userID = parameters[1];
+ username = parameters[2];
+ if (guac_client.onleave)
+ guac_client.onleave(userID, username);
+ break;
+
+ }
Review Comment:
Commit pushed: bd913274152fcc12a12e26955bb3acdaa71e52e8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]