// Update the local timeline from a Meteor server
// XXX: If @a is subscribed to @b, @a should get @b's notices in @a's Personal timeline.
//      Do Replies timeline.

var MeteorUpdater = function()
{
    return {

        init: function(server, port, timeline)
        {
            var screen_name;

            Meteor.callbacks["process"] = function(data) {
                var d = JSON.parse(data);
                screen_name = d['user']['screen_name'];

                if (timeline == 'public' ||
                    $('address .url')[0].href+screen_name+'/all' == window.location.href ||
                    $('address .url')[0].href+screen_name == window.location.href) {
                    RealtimeUpdate.receive(d);
                }
            };

            Meteor.host = server;
            Meteor.port = port;
            Meteor.joinChannel(timeline, 0);
            Meteor.connect();
        }
    }
}();


@@ -199,16 +199,17 @@
 )%0A%7B%0A    
+ 
 return %7B
@@ -210,16 +210,18 @@
 turn %7B%0A%0A
+  
         
@@ -267,18 +267,23 @@
         
-%7B%0A
+  %7B%0A   
         
@@ -308,32 +308,35 @@
 e;%0A%0A            
+   
 Meteor.callbacks
@@ -362,24 +362,28 @@
 ion(data) %7B%0A
+    
             
@@ -428,16 +428,20 @@
         
+    
 screen_n
@@ -489,16 +489,20 @@
         
+   
+ 
 if (time
@@ -517,24 +517,28 @@
 'public' %7C%7C%0A
+    
             
@@ -629,32 +629,36 @@
                 
+  
+  
 $('address .url'
@@ -726,16 +726,20 @@
         
+    
 Realtime
@@ -769,26 +769,33 @@
             
-%7D%0A
+    %7D%0A   
             
@@ -806,24 +806,27 @@
             
+ 
+  
 Meteor.host 
@@ -843,24 +843,27 @@
             
+   
 Meteor.port 
@@ -878,24 +878,27 @@
             
+  
+ 
 Meteor.joinC
@@ -922,32 +922,35 @@
 0);%0A            
+   
 Meteor.connect()
@@ -955,26 +955,29 @@
 ();%0A        
+  
 %7D%0A
+ 
     %7D%0A%7D();%0A%0A

Revert "Fixed indenting"