summaryrefslogtreecommitdiffstats
path: root/pages/chat.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-03-27 15:38:44 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-03-27 15:38:44 -0700
commitf859baa3137b1d16f7252947554c51c58daf2b90 (patch)
tree711b1a17913920cd54d52aef8da3d0c917d90b08 /pages/chat.php
parentdf4c55fc90528c136d72fe2684ed797cba2c40ef (diff)
downloadpathery-f859baa3137b1d16f7252947554c51c58daf2b90.tar.xz
BUGFIX: Chat eating messages. Also removed 'the supermarket'. Hell, it's about time.
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 68a0abf..da423bf 100644
--- a/pages/chat.php
+++ b/pages/chat.php
@@ -199,14 +199,16 @@ function getChat(message) {
var dataString = 'getChatFromID='+lastID;
if (chatBuffer.length > 0) {
dataString += '&send=true&messages='+prepChat(chatBuffer);
- chatBuffer.length = 0;
}
$.ajax({
type: "POST",
url: "ajax/chat.ajax.php",
- data: dataString,
- success: function(data) {getChatDone(data);}
+ data: dataString,
+ success: function(data) {
+ getChatDone(data);
+ chatBuffer.length = 0;
+ }
});
}