]> git.scottworley.com Git - reliable-chat/blobdiff - webclient/rc.html
Documentation: What's in a message
[reliable-chat] / webclient / rc.html
index bb998256ae8c809e379ae57abba904df9de70db6..8094f41669c8e1402c79fcd4aa21356d01ab7461 100644 (file)
        var session = Math.random();  // For outgoing message IDs
        var since = {};    // server -> time: For fetch?since=
        var seen = {};     // seen_key -> message
+       // Messages have these fields:
+       //   Time: The server timestamp of the first copy to arrive 
+       //   ID: Some unique string for deduping
+       //   Text: The text of the message
+       //   UI: The DOM node for this message in the UI
 
        function rcnick() {
                var nick = localStorage.getItem("nick");