changeset 40:11c4fb8bec3c

Added timestamp to messages, though they're not currently displayed in any way.
author Atul Varma <varmaa@toolness.com>
date Mon, 27 Apr 2009 22:26:57 -0700
parents 882b75e96c17
children c9ba9a45f1dd
files openwebchat.js
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/openwebchat.js	Mon Apr 27 22:16:53 2009 -0700
+++ b/openwebchat.js	Mon Apr 27 22:26:57 2009 -0700
@@ -35,7 +35,8 @@
         if (evt.keyCode == ENTER_KEYCODE) {
           if (content) {
             $(this).val('');
-            var msg = {content: content};
+            var msg = {content: content,
+                       time: new Date()};
             if (author)
               msg.author = author;
             OpenWebChat.sendMessage(msg);