diff --git a/static/js/server_events.js b/static/js/server_events.js index d63d3d266e..1589b419f2 100644 --- a/static/js/server_events.js +++ b/static/js/server_events.js @@ -261,7 +261,7 @@ exports.check_for_unsuspend = function () { }; setInterval(exports.check_for_unsuspend, 5000); -util.execute_early(function () { +exports.initialize = function () { $(document).on('unsuspend', function () { // Immediately poll for new events on unsuspend blueslip.log("Restarting get_events due to unsuspend"); @@ -269,7 +269,7 @@ util.execute_early(function () { exports.restart_get_events({dont_block: true}); }); get_events(); -}); +}; exports.cleanup_event_queue = function cleanup_event_queue() { // Submit a request to the server to cleanup our event queue diff --git a/static/js/ui_init.js b/static/js/ui_init.js index f89a354faa..c4a9cd75c8 100644 --- a/static/js/ui_init.js +++ b/static/js/ui_init.js @@ -243,6 +243,7 @@ $(function () { // initialize other stuff reload.initialize(); + server_events.initialize(); people.initialize(); bot_data.initialize(); // Must happen after people.initialize() message_fetch.initialize();