jmuehlner commented on code in PR #791:
URL: https://github.com/apache/guacamole-client/pull/791#discussion_r1091016760


##########
guacamole-common-js/src/main/webapp/modules/Client.js:
##########
@@ -1416,8 +1450,24 @@ Guacamole.Client = function(tunnel) {
         },
         
         "msg" : function(parameters) {
-            
-            if (guac_client.onmsg) guac_client.onmsg(parseInt(parameters[0]), 
parameters.slice(1));
+
+            var msgid = parseInt(parameters[0]);
+            if (guac_client.onmsg)
+                guac_client.onmsg(msgid, parameters.slice(1));
+
+            switch (msgid) {
+
+                case Guacamole.Client.Message.USER_JOINED:
+                    if (guac_client.onjoin)
+                        guac_client.onjoin(parameters[1] /* User ID */, 
parameters[2] /* Name */);

Review Comment:
   These comments are helpful to know what these parameters are, but why not 
just put the values in appropriately named variables? That seems more 
straightforward.



-- 
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]

Reply via email to