<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -131,9 +131,18 @@ Chat.prototype._handleLeave = function(leaver) {
 };
 
 Chat.prototype._handleMessage = function(message) {
+  // Ignore messages we send ourselves unless this is request #1 (history fetch)
+  var ignore = (message._client_id == this.user.client_id)
+            &amp;&amp; (this.channel.requestNum &gt; 0);
+
+  if (ignore) {
+    return false;
+  }
   this.ui.userMessage(message);
 };
 
 Chat.prototype.send = function(message) {
-  this.channel.emit('message', {user: this.user.name, text: message});
+  message = {user: this.user.name, text: message};
+  this.channel.emit('message', message);
+  this.ui.userMessage(message);
 };
\ No newline at end of file</diff>
      <filename>client/example/paste_chat/js/lib/chat.js</filename>
    </modified>
    <modified>
      <diff>@@ -264,6 +264,7 @@ try {
 
     this.timeout = 45 * 1000;
     this.pause =  1 * 1000;
+    this.requestNum = 0;
   };
   node.inherits(nodeChannel.Channel, node.EventEmitter);
 
@@ -310,6 +311,7 @@ try {
     var self = this;
     request.addCallback(function(r) {
       self._emitHistory(r.history);
+      self.requestNum++;
 
       setTimeout(function() {
         self.listen();</diff>
      <filename>client/lib/jquery.node-channel.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>aacd6b2b4e14726098c0b0e64ac0a9fc4bcfeefd</id>
    </parent>
  </parents>
  <author>
    <name>Felix Geisend&#246;rfer</name>
    <email>felix@debuggable.com</email>
  </author>
  <url>http://github.com/felixge/node-channel/commit/d13f576459e849193eee8ae166901fd5951f5b9e</url>
  <id>d13f576459e849193eee8ae166901fd5951f5b9e</id>
  <committed-date>2009-11-07T02:21:17-08:00</committed-date>
  <authored-date>2009-11-07T02:21:17-08:00</authored-date>
  <message>Show own message right away</message>
  <tree>f8068af91840d59881268d053b775e7e64091ffe</tree>
  <committer>
    <name>Felix Geisend&#246;rfer</name>
    <email>felix@debuggable.com</email>
  </committer>
</commit>
