Real-time Streaming - not sure if my nodebb installation is working
-
@noobbb it should update immediately. However, I believe the connection is shut down after a certain amount of inactivity.
-
Here is a really dirty hack. You can put it in your custom JS section in the ACP
var refreshTimeoutId = 0; $(window).on('action:ajaxify.end', function () { if (!app.user.uid) { return; } if (refreshTimeoutId) { clearTimeout(refreshTimeoutId); } refreshTimeoutId = setTimeout(ajaxify.refresh, 300000); });
This will cause the page to refresh after 5 mins of inactivity hence marking the user online again, after that they should keep receiving realtime notifications.
-
@noobbb I added the code to acp > appearance > custom html/css > custom header
then I restarted nodebb
I used a guest account to reply. The other account, which I am logged in with, always immediately gets a notification sound and message box at the bottom right so that's working perfectly. However, the message/post itself usually does not appear until I refresh the page. It does appear sometimes - usually if I have waited a while to reply first - seems like a cool down period is required? If I rapid fire a bunch of replies, they won't live stream.
Can I make it always live stream? Thanks.
-
@noobbb open a bug on Github and we'll see if we can reproduce the issue. If it's not streaming posts, it's a bug.
-
So, I tried opening a bug on github, but the devs couldn't replicate the issue on their end. Would anyone be able to point me in the right direction? eg the code that is responsible to making new replies "live stream"? I found a few candidates to investigate
http://i.imgur.com/1Ud2a8l.jpg
but I'm not sure if I'm on the right track. Thank you.