diff --git a/frontend_tests/node_tests/presence.js b/frontend_tests/node_tests/presence.js index 1de029fda9..f3871b55c4 100644 --- a/frontend_tests/node_tests/presence.js +++ b/frontend_tests/node_tests/presence.js @@ -49,6 +49,10 @@ people.add_in_realm(zoe); people.add_in_realm(bot); people.initialize_current_user(me.user_id); +run_test('my user', () => { + assert.equal(presence.get_status(me.user_id), 'active'); +}); + run_test('on_mobile_property', () => { // TODO: move this test to a new test module directly testing presence.js var status_from_timestamp = presence._status_from_timestamp; diff --git a/static/js/presence.js b/static/js/presence.js index bfc4557c86..8391e7a34c 100644 --- a/static/js/presence.js +++ b/static/js/presence.js @@ -33,7 +33,7 @@ exports.is_active = function (user_id) { }; exports.get_status = function (user_id) { - if (user_id === page_params.user_id) { + if (people.is_my_user_id(user_id)) { return "active"; } if (user_id in exports.presence_info) {