From f7c3e79e2283cf1c3513e957a9eab6b14ff0331f Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 20 Feb 2013 02:03:08 -0800 Subject: Fix seeing your own message twice in chat. --- pages/chat.php | 8 +++++--- 1 file 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+ " "; p = p+ " "; + //Message is legitmently new or a server message? + if (user.ID > lastID || typeof(user.ID) == 'undefined') { + items.push('
' + p + '
'); + newChats = true; + } if (user.ID > 0) lastID = user.ID; - - items.push('
' + p + '
'); - newChats = true; }); //console.log("BUILD DONE"); -- cgit v1.2.3