gnu-social/public/plugins/Orbited/js/orbitedupdater.js
Diogo Cordeiro 2a06261f75 [CORE][COMPOSER] Move extlib packages with immediate composer correspondent to composer dependencies
This adds a composer.json for all dependencies that are available
2019-08-03 17:47:24 +01:00

25 lines
614 B
JavaScript

// Update the local timeline from a Orbited server
var OrbitedUpdater = function()
{
return {
init: function(server, port, timeline, username, password)
{
// set up stomp client.
stomp = new STOMPClient();
stomp.onmessageframe = function(frame) {
RealtimeUpdate.receive(JSON.parse(frame.body));
};
stomp.onconnectedframe = function() {
stomp.subscribe(timeline);
}
stomp.connect(server, port, username, password);
}
}
}();