From fd2766f7112856df57c68f9d32a2c92b108fdcb8 Mon Sep 17 00:00:00 2001 From: sostler Date: Sun, 25 Apr 2010 11:46:37 -0400 Subject: Added version numbers to chat api --- static/js/pichat.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'static/js') diff --git a/static/js/pichat.js b/static/js/pichat.js index 6279e48..db49bb1 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -352,6 +352,10 @@ function updateTopic(newTopic) { function refresh() { var onSuccess = function(json) { try { + if (Version != json.v) { + location.reload(); + } + Timestamp = json.timestamp; $.map(json.messages, function(msg){ MessageContentCache[msg.msg_id.toString()] = msg.content }) -- cgit v1.2.3-70-g09d2