]> git.scottworley.com Git - reliable-chat/commitdiff
Minor syntax cleanup
authorScott Worley <sworley@chkno.net>
Fri, 3 Aug 2012 07:26:19 +0000 (00:26 -0700)
committerScott Worley <sworley@chkno.net>
Fri, 3 Aug 2012 07:26:19 +0000 (00:26 -0700)
webclient/rc.html

index 8f69921f4241c678fc0d565045b6abb6699b882d..97491cdc885decba9854a7c0a0b000f55b56dae2 100644 (file)
 
        function rcreceivemessages(server, messages) {
                for (var i in messages) {
-                       var seen_key = make_seen_key(messages[i]['ID'], messages[i]['Text']);
+                       var m = messages[i];
+                       var seen_key = make_seen_key(m.ID, m.Text);
                        if (!(seen_key in seen)) {
                                seen[seen_key] = true;
-                               rcaddmessagetohistory(messages[i]);
+                               rcaddmessagetohistory(m);
                                for (var i in servers) {
                                        rcchangeserverstatus(servers[i], "sad");
                                }
                                                        rcreceivemessages(server, messages);
                                                        delay = 40;
                                                        if (messages.length >= 1 && "Time" in messages[messages.length-1]) {
-                                                               since[server] = messages[messages.length-1]["Time"];
+                                                               since[server] = messages[messages.length-1].Time;
                                                        }
                                                }
                                        }