2009-09-21 20:32:36 +09:00
|
|
|
// 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.
|
2009-07-11 01:57:38 +09:00
|
|
|
|
|
|
|
var MeteorUpdater = function()
|
|
|
|
{
|
2009-09-24 00:08:12 +09:00
|
|
|
return {
|
2009-07-11 01:57:38 +09:00
|
|
|
|
2009-09-24 00:08:12 +09:00
|
|
|
init: function(server, port, timeline)
|
|
|
|
{
|
|
|
|
Meteor.callbacks["process"] = function(data) {
|
2009-09-24 00:08:35 +09:00
|
|
|
RealtimeUpdate.receive(JSON.parse(data));
|
2009-09-24 00:08:12 +09:00
|
|
|
};
|
2009-07-11 01:57:38 +09:00
|
|
|
|
2009-09-24 00:08:12 +09:00
|
|
|
Meteor.host = server;
|
|
|
|
Meteor.port = port;
|
|
|
|
Meteor.joinChannel(timeline, 0);
|
|
|
|
Meteor.connect();
|
|
|
|
}
|
|
|
|
}
|
2009-07-11 01:57:38 +09:00
|
|
|
}();
|
|
|
|
|