FIX: MessageBus would stall after 20 minutes of inactivity (PR #13219)

Previous to this change we would switch off MessageBus updating after 20 minutes.

This ensures that when the user becomes present again we turn on long polling.

Without long polling updates can be delayed for minutes.

GitHub

import userPresent, { onPresenceChange } from "discourse/lib/user-presence";

sure will clean this up! thanks!

Should we clean up this constant in our Qunit test suite? State leaks like this has been a constant source of pain in our QUnit test suite. While we’re only adding a callback once in an initializer now, it may not be true in the future.

there is a full bypass on all this code in test mode per: discourse/message-bus.js at 45073891f33aacaba9bf97a14e782772538ec816 · discourse/discourse · GitHub

Ahh icic :+1: