summaryrefslogtreecommitdiffstats
path: root/pages/chat.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-20 02:03:08 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-20 02:03:08 -0800
commitf7c3e79e2283cf1c3513e957a9eab6b14ff0331f (patch)
tree7ddb1d7334d8293aa0465ea208a8c30df6d47047 /pages/chat.php
parentd4d2cc43100934cb615492f519fc4ddded6d544c (diff)
downloadpathery-f7c3e79e2283cf1c3513e957a9eab6b14ff0331f.tar.xz
Fix seeing your own message twice in chat.
Diffstat (limited to 'pages/chat.php')
-rw-r--r--pages/chat.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/pages/chat.php b/pages/chat.php
index ba99694..b90226c 100644
--- a/pages/chat.php
+++ b/pages/chat.php
@@ -98,10 +98,12 @@ function getChatDone(data) {
p = p+ " </span>";
p = p+ " </div>";
+ //Message is legitmently new or a server message?
+ if (user.ID > lastID || typeof(user.ID) == 'undefined') {
+ items.push('<div class="chatMessage'+strClass+'" id="C_' + user.ID + '">' + p + '</div>');
+ newChats = true;
+ }
if (user.ID > 0) lastID = user.ID;
-
- items.push('<div class="chatMessage'+strClass+'" id="C_' + user.ID + '">' + p + '</div>');
- newChats = true;
});
//console.log("BUILD DONE");