X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FOrbited%2Forbitedupdater.js;h=8c5ab3b7327458063237126bf9f933ed9d4c1715;hb=e4085087f13852412f0b97b5c3d2178796c0de7a;hp=d70f4a4fda1d9ed95465b0829c232ae36c9f5789;hpb=035978270d609b650b8e32f252366e0e75b12507;p=quix0rs-gnu-social.git diff --git a/plugins/Orbited/orbitedupdater.js b/plugins/Orbited/orbitedupdater.js index d70f4a4fda..8c5ab3b732 100644 --- a/plugins/Orbited/orbitedupdater.js +++ b/plugins/Orbited/orbitedupdater.js @@ -9,13 +9,16 @@ var OrbitedUpdater = function() // set up stomp client. stomp = new STOMPClient(); - stomp.connect(server, port, username, password); - stomp.subscribe(timeline); - stomp.onmessageframe = function(frame) { RealtimeUpdate.receive(JSON.parse(frame.body)); }; - }; + + stomp.onconnectedframe = function() { + stomp.subscribe(timeline); + } + + stomp.connect(server, port, username, password); + } } }();