From d5f2eb3790388680c7c4386fe09e2835a784006d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 27 Nov 2018 17:36:28 -0800 Subject: [PATCH] Revert "buddy list: Put "me" at the top of the list." This reverts commit 1890c30ee100a368f5a3f20f6320f7fdfcfbe17d. --- frontend_tests/node_tests/activity.js | 7 ++----- frontend_tests/node_tests/buddy_data.js | 2 -- static/js/buddy_data.js | 5 ----- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.js index bf12d5da99..375d46f738 100644 --- a/frontend_tests/node_tests/activity.js +++ b/frontend_tests/node_tests/activity.js @@ -340,9 +340,9 @@ run_test('presence_list_full_update', () => { }); assert.deepEqual(user_ids, [ - me.user_id, fred.user_id, jill.user_id, + me.user_id, norbert.user_id, zoe.user_id, alice.user_id, @@ -426,21 +426,18 @@ run_test('group_update_dom_counts', () => { run_test('handlers', () => { // This is kind of weak coverage; we are mostly making sure that // keys and clicks got mapped to functions that don't crash. - let me_li; let alice_li; let fred_li; function init() { reset_setup(); buddy_list.populate({ - keys: [me.user_id, alice.user_id, fred.user_id], + keys: [alice.user_id, fred.user_id], }); - me_li = $.create('me stub'); alice_li = $.create('alice stub'); fred_li = $.create('fred stub'); - buddy_list_add(me.user_id, me_li); buddy_list_add(alice.user_id, alice_li); buddy_list_add(fred.user_id, fred_li); } diff --git a/frontend_tests/node_tests/buddy_data.js b/frontend_tests/node_tests/buddy_data.js index 2ff46f158c..cfbc3efdd4 100644 --- a/frontend_tests/node_tests/buddy_data.js +++ b/frontend_tests/node_tests/buddy_data.js @@ -27,8 +27,6 @@ function make_people() { is_bot: true, }; people.add_in_realm(bot); - - people.initialize_current_user(99999); } make_people(); diff --git a/static/js/buddy_data.js b/static/js/buddy_data.js index 3af40cb991..100ab8df3c 100644 --- a/static/js/buddy_data.js +++ b/static/js/buddy_data.js @@ -31,11 +31,6 @@ var fade_config = { }; function level(user_id) { - if (people.is_my_user_id(user_id)) { - // Always put current user at the top. - return 0; - } - var status = presence.get_status(user_id); switch (status) {