]> git.scottworley.com Git - reliable-chat/commitdiff
Pass message on *after* setting since.
authorScott Worley <sworley@chkno.net>
Fri, 3 Aug 2012 07:58:03 +0000 (00:58 -0700)
committerScott Worley <sworley@chkno.net>
Fri, 3 Aug 2012 07:58:03 +0000 (00:58 -0700)
rcreceivemessages() modifies the message.  The fetch loop needs
to extract the final timestamp for since= feedback before it is
modified.

webclient/rc.html

index a062a176b2dc8a92e0bb7f62fee1ebf9cefa2d5a..0dd591c11f3ac9c3a264ada813232136dd742a49 100644 (file)
                                        if (rtxt != null) {
                                                var messages = JSON.parse(rtxt);
                                                if (messages != null) {
                                        if (rtxt != null) {
                                                var messages = JSON.parse(rtxt);
                                                if (messages != null) {
-                                                       rcreceivemessages(server, messages);
                                                        delay = 40;
                                                        if (messages.length >= 1 && "Time" in messages[messages.length-1]) {
                                                                since[server] = messages[messages.length-1].Time;
                                                        }
                                                        delay = 40;
                                                        if (messages.length >= 1 && "Time" in messages[messages.length-1]) {
                                                                since[server] = messages[messages.length-1].Time;
                                                        }
+                                                       rcreceivemessages(server, messages);
                                                }
                                        }
                                }
                                                }
                                        }
                                }