gnu-social/plugins/Meteor/meteorupdater.js
2009-07-14 17:06:29 -04:00

22 lines
484 B
JavaScript

// update the local timeline from a Meteor server
//
var MeteorUpdater = function()
{
return {
init: function(server, port, timeline)
{
Meteor.callbacks["process"] = function(data) {
RealtimeUpdate.receive(JSON.parse(data));
};
Meteor.host = server;
Meteor.port = port;
Meteor.joinChannel(timeline, 0);
Meteor.connect();
}
}
}();