Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
js: Purge people module from window.
Priyank Patelb7998d31601a
diff --git a/.eslintrc.json b/.eslintrc.jsonindex 6e96f91c7ba..0e6b02aa1ae 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -191,7 +191,6 @@"page_params": false,"panels": false,"pill_typeahead": false,- "people": false,"pm_list": false,"pm_list_dom": false,"pointer": false,diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.jsindex 200f7cf8c66..c1666015aa6 100644--- a/frontend_tests/node_tests/activity.js+++ b/frontend_tests/node_tests/activity.js@@ -81,7 +81,7 @@ zrequire("unread");zrequire("hash_util");zrequire("narrow");zrequire("presence");-zrequire("people");+const people = zrequire("people");zrequire("buddy_data");zrequire("buddy_list");zrequire("user_search");diff --git a/frontend_tests/node_tests/alert_words.js b/frontend_tests/node_tests/alert_words.jsindex 345e1278609..698ef4e3eb7 100644--- a/frontend_tests/node_tests/alert_words.js+++ b/frontend_tests/node_tests/alert_words.js@@ -4,7 +4,7 @@ const params = {alert_words: ["alertone", "alerttwo", "alertthree", "al*rt.*s", ".+", "emoji"],};-zrequire("people");+const people = zrequire("people");zrequire("alert_words");alert_words.initialize(params);diff --git a/frontend_tests/node_tests/bot_data.js b/frontend_tests/node_tests/bot_data.jsindex 46a20964a61..7ecab7d0f07 100644--- a/frontend_tests/node_tests/bot_data.js+++ b/frontend_tests/node_tests/bot_data.js@@ -7,7 +7,7 @@ const _settings_bots = {set_global("settings_bots", _settings_bots);zrequire("bot_data");-zrequire("people");+const people = zrequire("people");const me = {email: "[email protected]",diff --git a/frontend_tests/node_tests/buddy_data.js b/frontend_tests/node_tests/buddy_data.jsindex 145ee86f4a9..ee7e2e3fd2f 100644--- a/frontend_tests/node_tests/buddy_data.js+++ b/frontend_tests/node_tests/buddy_data.js@@ -6,7 +6,7 @@ const _page_params = {};set_global("page_params", _page_params);set_global("$", global.make_zjquery());-zrequire("people");+const people = zrequire("people");zrequire("presence");zrequire("user_status");diff --git a/frontend_tests/node_tests/buddy_list.js b/frontend_tests/node_tests/buddy_list.jsindex bd346d66196..a1232af8af3 100644--- a/frontend_tests/node_tests/buddy_list.js+++ b/frontend_tests/node_tests/buddy_list.js@@ -3,7 +3,7 @@const _ = require("lodash");set_global("$", global.make_zjquery());-zrequire("people");+const people = zrequire("people");zrequire("buddy_data");zrequire("buddy_list");zrequire("ui");diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.jsindex b81d08cab6d..6c2cf3a5116 100644--- a/frontend_tests/node_tests/compose.js+++ b/frontend_tests/node_tests/compose.js@@ -73,7 +73,7 @@ zrequire("rtl");zrequire("common");zrequire("stream_data");zrequire("compose_state");-zrequire("people");+const people = zrequire("people");zrequire("input_pill");zrequire("user_pill");zrequire("compose_pm_pill");diff --git a/frontend_tests/node_tests/compose_actions.js b/frontend_tests/node_tests/compose_actions.jsindex de62823d547..3ec72bac459 100644--- a/frontend_tests/node_tests/compose_actions.js+++ b/frontend_tests/node_tests/compose_actions.js@@ -20,7 +20,7 @@ set_global("compose_pm_pill", {});set_global("hash_util", {});-zrequire("people");+const people = zrequire("people");zrequire("compose_ui");zrequire("compose");zrequire("compose_state");diff --git a/frontend_tests/node_tests/compose_fade.js b/frontend_tests/node_tests/compose_fade.jsindex 33a60d2b9a4..204c4b4bc63 100644--- a/frontend_tests/node_tests/compose_fade.js+++ b/frontend_tests/node_tests/compose_fade.js@@ -1,7 +1,7 @@"use strict";zrequire("stream_data");-zrequire("people");+const people = zrequire("people");zrequire("compose_fade");const me = {diff --git a/frontend_tests/node_tests/compose_pm_pill.js b/frontend_tests/node_tests/compose_pm_pill.jsindex 88e65f8c2da..02437be60d3 100644--- a/frontend_tests/node_tests/compose_pm_pill.js+++ b/frontend_tests/node_tests/compose_pm_pill.js@@ -2,13 +2,7 @@set_global("$", global.make_zjquery());-const _people = {- small_avatar_url_for_person() {- return "http://example.com/example.png";- },-};--set_global("people", _people);+const people = zrequire("people");zrequire("compose_pm_pill");zrequire("input_pill");diff --git a/frontend_tests/node_tests/compose_ui.js b/frontend_tests/node_tests/compose_ui.jsindex 1605963029b..3568bcc540e 100644--- a/frontend_tests/node_tests/compose_ui.js+++ b/frontend_tests/node_tests/compose_ui.js@@ -1,7 +1,7 @@"use strict";zrequire("compose_ui");-zrequire("people");+const people = zrequire("people");zrequire("user_status");set_global("document", {diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.jsindex cd52c49edda..5e3afe2fd75 100644--- a/frontend_tests/node_tests/composebox_typeahead.js+++ b/frontend_tests/node_tests/composebox_typeahead.js@@ -6,7 +6,7 @@ zrequire("compose_state");zrequire("pm_conversations");zrequire("templates");zrequire("typeahead_helper");-zrequire("people");+const people = zrequire("people");zrequire("user_groups");zrequire("stream_data");zrequire("user_pill");diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.jsindex 71e86ae0729..76baae4dba5 100644--- a/frontend_tests/node_tests/dispatch.js+++ b/frontend_tests/node_tests/dispatch.js@@ -75,7 +75,7 @@ zrequire("stream_topic_history");zrequire("stream_list");zrequire("message_flags");zrequire("message_store");-zrequire("people");+const people = zrequire("people");zrequire("starred_messages");zrequire("user_status");zrequire("subs");diff --git a/frontend_tests/node_tests/dispatch_subs.js b/frontend_tests/node_tests/dispatch_subs.jsindex 41b927bbb28..4dd573dfcd3 100644--- a/frontend_tests/node_tests/dispatch_subs.js+++ b/frontend_tests/node_tests/dispatch_subs.js@@ -9,7 +9,7 @@ set_global("compose_fade", {});set_global("stream_events", {});set_global("subs", {});-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("server_events_dispatch");diff --git a/frontend_tests/node_tests/drafts.js b/frontend_tests/node_tests/drafts.jsindex 2a433129cf9..8a2e65b69e9 100644--- a/frontend_tests/node_tests/drafts.js+++ b/frontend_tests/node_tests/drafts.js@@ -36,15 +36,6 @@ set_global("stream_data", {return "#FFFFFF";},});-set_global("people", {- // Mocking get_by_email function, here we are- // just returning string before `@` in email- get_by_email(email) {- return {- full_name: email.split("@")[0],- };- },-});set_global("markdown", {apply_markdown: noop,});@@ -268,21 +259,21 @@ run_test("format_drafts", (override) => {{draft_id: "id2",is_stream: false,- recipients: "aaron",+ recipients: "[email protected]",raw_content: "Test Private Message",time_stamp: "Jan 30",},{draft_id: "id5",is_stream: false,- recipients: "aaron",+ recipients: "[email protected]",raw_content: "Test Private Message 3",time_stamp: "Jan 29",},{draft_id: "id4",is_stream: false,- recipients: "aaron",+ recipients: "[email protected]",raw_content: "Test Private Message 2",time_stamp: "Jan 26",},diff --git a/frontend_tests/node_tests/echo.js b/frontend_tests/node_tests/echo.jsindex a38c24862f9..c6feae67589 100644--- a/frontend_tests/node_tests/echo.js+++ b/frontend_tests/node_tests/echo.js@@ -8,7 +8,7 @@ set_global("local_message", {set_global("page_params", {});zrequire("echo");-zrequire("people");+const people = zrequire("people");let disparities = [];let messages_to_rerender = [];diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.jsindex 6f9d39487c6..f2fd81a98c9 100644--- a/frontend_tests/node_tests/filter.js+++ b/frontend_tests/node_tests/filter.js@@ -2,7 +2,7 @@zrequire("unread");zrequire("stream_data");-zrequire("people");+const people = zrequire("people");global.stub_out_jquery();set_global("$", global.make_zjquery());zrequire("message_util", "js/message_util");diff --git a/frontend_tests/node_tests/general.js b/frontend_tests/node_tests/general.jsindex c2b13aa50dc..88d31b210d6 100644--- a/frontend_tests/node_tests/general.js+++ b/frontend_tests/node_tests/general.js@@ -17,7 +17,7 @@ assert(util.find_wildcard_mentions("mention @**everyone**"));// * change the data// * get a true value-zrequire("people");+const people = zrequire("people");const isaac = {email: "[email protected]",user_id: 30,diff --git a/frontend_tests/node_tests/hash_util.js b/frontend_tests/node_tests/hash_util.jsindex 47369be8b2e..97c82ca5768 100644--- a/frontend_tests/node_tests/hash_util.js+++ b/frontend_tests/node_tests/hash_util.js@@ -2,7 +2,7 @@zrequire("hash_util");zrequire("stream_data");-zrequire("people");+const people = zrequire("people");zrequire("Filter", "js/filter");zrequire("narrow_state");diff --git a/frontend_tests/node_tests/hashchange.js b/frontend_tests/node_tests/hashchange.jsindex b67a4684778..c713a433f68 100644--- a/frontend_tests/node_tests/hashchange.js+++ b/frontend_tests/node_tests/hashchange.js@@ -8,7 +8,7 @@ set_global("location", {});set_global("to_$", () => window_stub);-zrequire("people");+const people = zrequire("people");zrequire("hash_util");zrequire("hashchange");zrequire("stream_data");diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.jsindex 67beb54c2c5..74a141bcd25 100644--- a/frontend_tests/node_tests/markdown.js+++ b/frontend_tests/node_tests/markdown.js@@ -10,7 +10,7 @@ const marked = zrequire("marked", "third/marked/lib/marked");zrequire("markdown");zrequire("message_store");-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("user_groups");diff --git a/frontend_tests/node_tests/message_events.js b/frontend_tests/node_tests/message_events.jsindex b29b64dda7d..a53161b8d3c 100644--- a/frontend_tests/node_tests/message_events.js+++ b/frontend_tests/node_tests/message_events.js@@ -3,7 +3,7 @@zrequire("message_events");zrequire("message_store");zrequire("muting");-zrequire("people");+const people = zrequire("people");zrequire("recent_senders");zrequire("stream_data");zrequire("stream_topic_history");diff --git a/frontend_tests/node_tests/message_fetch.js b/frontend_tests/node_tests/message_fetch.jsindex 9230517ca16..2c1d5db67b9 100644--- a/frontend_tests/node_tests/message_fetch.js+++ b/frontend_tests/node_tests/message_fetch.js@@ -18,7 +18,7 @@ zrequire("FetchStatus", "js/fetch_status");zrequire("Filter", "js/filter");zrequire("MessageListData", "js/message_list_data");zrequire("message_list");-zrequire("people");+const people = zrequire("people");set_global("recent_topics", {process_messages: noop,diff --git a/frontend_tests/node_tests/message_store.js b/frontend_tests/node_tests/message_store.jsindex 142f16b2550..e948bb704ab 100644--- a/frontend_tests/node_tests/message_store.js+++ b/frontend_tests/node_tests/message_store.js@@ -2,7 +2,7 @@const util = zrequire("util");zrequire("pm_conversations");-zrequire("people");+const people = zrequire("people");zrequire("message_store");const noop = function () {};diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.jsindex 6e954e0ad95..ee8856d0210 100644--- a/frontend_tests/node_tests/narrow.js+++ b/frontend_tests/node_tests/narrow.js@@ -4,7 +4,7 @@ set_global("$", global.make_zjquery());zrequire("hash_util");zrequire("hashchange");zrequire("narrow_state");-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("Filter", "js/filter");set_global("page_params", {diff --git a/frontend_tests/node_tests/narrow_state.js b/frontend_tests/node_tests/narrow_state.jsindex 79bea630439..74096fdf1a5 100644--- a/frontend_tests/node_tests/narrow_state.js+++ b/frontend_tests/node_tests/narrow_state.js@@ -1,6 +1,6 @@"use strict";-zrequire("people");+const people = zrequire("people");zrequire("Filter", "js/filter");zrequire("stream_data");zrequire("narrow_state");diff --git a/frontend_tests/node_tests/narrow_unread.js b/frontend_tests/node_tests/narrow_unread.jsindex 6f2a7db9817..3131e2ed93e 100644--- a/frontend_tests/node_tests/narrow_unread.js+++ b/frontend_tests/node_tests/narrow_unread.js@@ -1,7 +1,7 @@"use strict";zrequire("Filter", "js/filter");-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("unread");diff --git a/frontend_tests/node_tests/people.js b/frontend_tests/node_tests/people.jsindex f9c4ba8a66e..1f871310db6 100644--- a/frontend_tests/node_tests/people.js+++ b/frontend_tests/node_tests/people.js@@ -4,9 +4,10 @@ const _ = require("lodash");const moment = require("moment-timezone");const rewiremock = require("rewiremock/node");-rewiremock.proxy(() => zrequire("people"), {+const people = rewiremock.proxy(() => zrequire("people"), {"moment-timezone": () => moment("20130208T080910"),});+set_global("message_store", {});set_global("page_params", {});set_global("settings_data", {});diff --git a/frontend_tests/node_tests/people_errors.js b/frontend_tests/node_tests/people_errors.jsindex 1c2b1f27d7a..98bca91ee29 100644--- a/frontend_tests/node_tests/people_errors.js+++ b/frontend_tests/node_tests/people_errors.js@@ -1,6 +1,6 @@"use strict";-zrequire("people");+const people = zrequire("people");const return_false = function () {return false;diff --git a/frontend_tests/node_tests/pm_conversations.js b/frontend_tests/node_tests/pm_conversations.jsindex fd09bbec6d9..b9b8a377dcb 100644--- a/frontend_tests/node_tests/pm_conversations.js+++ b/frontend_tests/node_tests/pm_conversations.js@@ -15,7 +15,7 @@ run_test("partners", () => {assert.equal(pmc.is_partner(user3_id), true);});-zrequire("people");+const people = zrequire("people");run_test("insert_recent_private_message", () => {const params = {diff --git a/frontend_tests/node_tests/pm_list.js b/frontend_tests/node_tests/pm_list.jsindex 569e9dbf391..18ee47e29f9 100644--- a/frontend_tests/node_tests/pm_list.js+++ b/frontend_tests/node_tests/pm_list.js@@ -20,7 +20,7 @@ zrequire("user_status");zrequire("presence");zrequire("buddy_data");zrequire("hash_util");-zrequire("people");+const people = zrequire("people");const pm_conversations = zrequire("pm_conversations");zrequire("pm_list");diff --git a/frontend_tests/node_tests/poll_widget.js b/frontend_tests/node_tests/poll_widget.jsindex e46631e94e7..5a55666ce55 100644--- a/frontend_tests/node_tests/poll_widget.js+++ b/frontend_tests/node_tests/poll_widget.js@@ -4,7 +4,7 @@ zrequire("poll_widget");set_global("$", global.make_zjquery());-set_global("people", {});+const people = zrequire("people");const return_false = () => false;const return_true = () => true;diff --git a/frontend_tests/node_tests/popovers.js b/frontend_tests/node_tests/popovers.jsindex 5d8090ecc73..e71925c05c2 100644--- a/frontend_tests/node_tests/popovers.js+++ b/frontend_tests/node_tests/popovers.js@@ -7,7 +7,7 @@ set_global("$", global.make_zjquery());zrequire("hash_util");zrequire("narrow");zrequire("narrow_state");-zrequire("people");+const people = zrequire("people");zrequire("presence");zrequire("buddy_data");zrequire("user_status");diff --git a/frontend_tests/node_tests/presence.js b/frontend_tests/node_tests/presence.jsindex cf1007ffa77..1c371f69d16 100644--- a/frontend_tests/node_tests/presence.js+++ b/frontend_tests/node_tests/presence.js@@ -2,7 +2,7 @@const XDate = require("xdate");-zrequire("people");+const people = zrequire("people");zrequire("presence");const return_false = function () {diff --git a/frontend_tests/node_tests/reactions.js b/frontend_tests/node_tests/reactions.jsindex ee2e276f34a..d078a7b54cd 100644--- a/frontend_tests/node_tests/reactions.js+++ b/frontend_tests/node_tests/reactions.js@@ -6,7 +6,7 @@ set_global("$", global.make_zjquery());const emoji_codes = zrequire("emoji_codes", "generated/emoji/emoji_codes.json");const emoji = zrequire("emoji", "shared/js/emoji");-zrequire("people");+const people = zrequire("people");zrequire("reactions");set_global("page_params", {diff --git a/frontend_tests/node_tests/recent_topics.js b/frontend_tests/node_tests/recent_topics.jsindex 24b49f62230..c1d6c16ba87 100644--- a/frontend_tests/node_tests/recent_topics.js+++ b/frontend_tests/node_tests/recent_topics.js@@ -18,12 +18,11 @@ set_global("overlays", {},recent_topics_open: () => true,});-set_global("people", {- is_my_user_id(id) {- return id === 1;- },- sender_info_with_small_avatar_urls_for_sender_ids: (ids) => ids,-});++const people = zrequire("people");+people.is_my_user_id = (id) => id === 1;+people.sender_info_with_small_avatar_urls_for_sender_ids = (ids) => ids;+set_global("timerender", {last_seen_status_from_date: () => "Just now",get_full_datetime: () => ({diff --git a/frontend_tests/node_tests/rendered_markdown.js b/frontend_tests/node_tests/rendered_markdown.jsindex a9c3a3999b6..7ef9d3f72e3 100644--- a/frontend_tests/node_tests/rendered_markdown.js+++ b/frontend_tests/node_tests/rendered_markdown.js@@ -1,7 +1,7 @@"use strict";const rm = zrequire("rendered_markdown");-zrequire("people");+const people = zrequire("people");zrequire("user_groups");zrequire("stream_data");zrequire("timerender");diff --git a/frontend_tests/node_tests/search_suggestion.js b/frontend_tests/node_tests/search_suggestion.jsindex fbe017e1a42..4dc503cc34a 100644--- a/frontend_tests/node_tests/search_suggestion.js+++ b/frontend_tests/node_tests/search_suggestion.js@@ -19,7 +19,7 @@ zrequire("Filter", "js/filter");zrequire("narrow_state");zrequire("stream_data");zrequire("stream_topic_history");-zrequire("people");+const people = zrequire("people");zrequire("unread");zrequire("common");const search = zrequire("search_suggestion");diff --git a/frontend_tests/node_tests/search_suggestion_legacy.js b/frontend_tests/node_tests/search_suggestion_legacy.jsindex 443badd6190..76cae28d106 100644--- a/frontend_tests/node_tests/search_suggestion_legacy.js+++ b/frontend_tests/node_tests/search_suggestion_legacy.js@@ -18,7 +18,7 @@ zrequire("Filter", "js/filter");zrequire("narrow_state");zrequire("stream_data");zrequire("stream_topic_history");-zrequire("people");+const people = zrequire("people");zrequire("unread");zrequire("common");const search = zrequire("search_suggestion");diff --git a/frontend_tests/node_tests/settings_user_groups.js b/frontend_tests/node_tests/settings_user_groups.jsindex 9db9ca8acce..7bb44f87235 100644--- a/frontend_tests/node_tests/settings_user_groups.js+++ b/frontend_tests/node_tests/settings_user_groups.js@@ -26,12 +26,9 @@ set_global("user_groups", {add: noop,});set_global("ui_report", {});-set_global("people", {- my_current_user_id: noop,- small_avatar_url_for_person() {- return "http://example.com/example.png";- },-});++const people = zrequire("people");+set_global("page_params", {});function reset_test_setup(pill_container_stub) {diff --git a/frontend_tests/node_tests/stream_data.js b/frontend_tests/node_tests/stream_data.jsindex 53ccf0e29d1..db646b55c0d 100644--- a/frontend_tests/node_tests/stream_data.js+++ b/frontend_tests/node_tests/stream_data.js@@ -16,7 +16,7 @@ global.stub_out_jquery();zrequire("color_data");zrequire("hash_util");zrequire("stream_topic_history");-zrequire("people");+const people = zrequire("people");zrequire("stream_color");zrequire("stream_data");zrequire("FetchStatus", "js/fetch_status");diff --git a/frontend_tests/node_tests/stream_edit.js b/frontend_tests/node_tests/stream_edit.jsindex 32cf248b89f..0153b6b8de5 100644--- a/frontend_tests/node_tests/stream_edit.js+++ b/frontend_tests/node_tests/stream_edit.js@@ -31,7 +31,7 @@ set_global("ui", {set_global("$", global.make_zjquery());zrequire("input_pill");-zrequire("people");+const people = zrequire("people");zrequire("pill_typeahead");zrequire("subs");zrequire("stream_edit");diff --git a/frontend_tests/node_tests/stream_events.js b/frontend_tests/node_tests/stream_events.jsindex 2198b204754..a096a1c1675 100644--- a/frontend_tests/node_tests/stream_events.js+++ b/frontend_tests/node_tests/stream_events.js@@ -18,7 +18,7 @@ set_global("stream_list", {});set_global("stream_muting", {});set_global("subs", {});-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("stream_events");zrequire("Filter", "js/filter");diff --git a/frontend_tests/node_tests/top_left_corner.js b/frontend_tests/node_tests/top_left_corner.jsindex c4cfb14f230..b1d1480a60f 100644--- a/frontend_tests/node_tests/top_left_corner.js+++ b/frontend_tests/node_tests/top_left_corner.js@@ -4,7 +4,7 @@ set_global("$", global.make_zjquery());zrequire("Filter", "js/filter");zrequire("unread_ui");-zrequire("people");+const people = zrequire("people");zrequire("top_left_corner");diff --git a/frontend_tests/node_tests/transmit.js b/frontend_tests/node_tests/transmit.jsindex b300a50a8d7..0508e0f3b90 100644--- a/frontend_tests/node_tests/transmit.js+++ b/frontend_tests/node_tests/transmit.js@@ -12,7 +12,7 @@ set_global("sent_messages", {report_server_ack: noop,});-zrequire("people");+const people = zrequire("people");zrequire("transmit");run_test("transmit_message_ajax", () => {diff --git a/frontend_tests/node_tests/typeahead_helper.js b/frontend_tests/node_tests/typeahead_helper.jsindex 7fa1a41e5bb..61ab52b89fc 100644--- a/frontend_tests/node_tests/typeahead_helper.js+++ b/frontend_tests/node_tests/typeahead_helper.js@@ -10,7 +10,7 @@ page_params.realm_email_address_visibility =settings_config.email_address_visibility_values.admins_only.code;zrequire("recent_senders");-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("narrow");zrequire("hash_util");diff --git a/frontend_tests/node_tests/unread.js b/frontend_tests/node_tests/unread.jsindex 3daf58a8b4f..a443456ed5c 100644--- a/frontend_tests/node_tests/unread.js+++ b/frontend_tests/node_tests/unread.js@@ -3,7 +3,7 @@const _ = require("lodash");zrequire("muting");-zrequire("people");+const people = zrequire("people");zrequire("stream_data");zrequire("unread");diff --git a/frontend_tests/node_tests/user_events.js b/frontend_tests/node_tests/user_events.jsindex a4a17ace61b..fc326e37b63 100644--- a/frontend_tests/node_tests/user_events.js+++ b/frontend_tests/node_tests/user_events.js@@ -2,7 +2,7 @@set_global("$", global.make_zjquery());-zrequire("people");+const people = zrequire("people");const settings_config = zrequire("settings_config");zrequire("user_events");diff --git a/frontend_tests/node_tests/user_pill.js b/frontend_tests/node_tests/user_pill.jsindex 8cbe663ab25..1c628a5f0ac 100644--- a/frontend_tests/node_tests/user_pill.js+++ b/frontend_tests/node_tests/user_pill.js@@ -1,6 +1,6 @@"use strict";-zrequire("people");+const people = zrequire("people");set_global("md5", (s) => "md5-" + s);zrequire("user_pill");zrequire("pill_typeahead");diff --git a/frontend_tests/puppeteer_lib/common.js b/frontend_tests/puppeteer_lib/common.jsindex 7da9744142a..9b119d616ce 100644--- a/frontend_tests/puppeteer_lib/common.js+++ b/frontend_tests/puppeteer_lib/common.js@@ -180,7 +180,10 @@ class CommonUtils {if (this.fullname[name] !== undefined) {name = this.fullname[name];}- return await page.evaluate((name) => people.get_user_id_from_name(name), name);+ return await page.evaluate((name) => {+ const people = require("./static/js/people");+ return people.get_user_id_from_name(name);+ }, name);}async get_internal_email_from_name(page, name) {@@ -188,6 +191,7 @@ class CommonUtils {name = this.fullname[name];}return await page.evaluate((fullname) => {+ const people = require("./static/js/people");const user_id = people.get_user_id_from_name(fullname);return people.get_by_user_id(user_id).email;}, name);diff --git a/static/js/activity.js b/static/js/activity.jsindex 8da69941939..25842615a2a 100644--- a/static/js/activity.js+++ b/static/js/activity.js@@ -1,6 +1,9 @@"use strict";const _ = require("lodash");++const people = require("./people");+/*Helpers for detecting user activity and managing user idle states*/diff --git a/static/js/alert_words.js b/static/js/alert_words.jsindex 96861f1119b..e4ca89259e8 100644--- a/static/js/alert_words.js+++ b/static/js/alert_words.js@@ -2,6 +2,8 @@const _ = require("lodash");+const people = require("./people");+// For simplicity, we use a list for our internal// data, since that matches what the server sends us.let my_alert_words = [];diff --git a/static/js/bot_data.js b/static/js/bot_data.jsindex d8327769ea0..1d75325ab75 100644--- a/static/js/bot_data.js+++ b/static/js/bot_data.js@@ -2,6 +2,8 @@const _ = require("lodash");+const people = require("./people");+const bots = new Map();const bot_fields = [diff --git a/static/js/buddy_data.js b/static/js/buddy_data.jsindex 59851cad925..b20c3a856a8 100644--- a/static/js/buddy_data.js+++ b/static/js/buddy_data.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const util = require("./util");/*diff --git a/static/js/compose.js b/static/js/compose.jsindex c926b19d1b3..2a8a6832767 100644--- a/static/js/compose.js+++ b/static/js/compose.js@@ -8,6 +8,7 @@ const render_compose_invite_users = require("../templates/compose_invite_users.hconst render_compose_not_subscribed = require("../templates/compose_not_subscribed.hbs");const render_compose_private_stream_alert = require("../templates/compose_private_stream_alert.hbs");+const people = require("./people");const rendered_markdown = require("./rendered_markdown");const util = require("./util");diff --git a/static/js/compose_actions.js b/static/js/compose_actions.jsindex 62dd33f2956..76e03c240ab 100644--- a/static/js/compose_actions.js+++ b/static/js/compose_actions.js@@ -4,6 +4,8 @@ const autosize = require("autosize");const fenced_code = require("../shared/js/fenced_code");+const people = require("./people");+exports.blur_compose_inputs = function () {$(".message_comp").find("input, textarea, button, #private_message_recipient").trigger("blur");};diff --git a/static/js/compose_fade.js b/static/js/compose_fade.jsindex d6093e16e5e..c0ebace9a9e 100644--- a/static/js/compose_fade.js+++ b/static/js/compose_fade.js@@ -2,6 +2,7 @@const _ = require("lodash");+const people = require("./people");const util = require("./util");let focused_recipient;diff --git a/static/js/compose_pm_pill.js b/static/js/compose_pm_pill.jsindex 86b14c5496f..c5352d06063 100644--- a/static/js/compose_pm_pill.js+++ b/static/js/compose_pm_pill.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const util = require("./util");exports.initialize_pill = function () {diff --git a/static/js/compose_ui.js b/static/js/compose_ui.jsindex 35cd98e1524..8cad87a500e 100644--- a/static/js/compose_ui.js+++ b/static/js/compose_ui.js@@ -2,6 +2,8 @@const autosize = require("autosize");+const people = require("./people");+exports.autosize_textarea = function () {autosize.update($("#compose-textarea"));};diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.jsindex a0aebaa09ed..3610625587c 100644--- a/static/js/composebox_typeahead.js+++ b/static/js/composebox_typeahead.js@@ -8,6 +8,7 @@ const pygments_data = require("../generated/pygments_data.json");const emoji = require("../shared/js/emoji");const typeahead = require("../shared/js/typeahead");+const people = require("./people");const settings_data = require("./settings_data");//************************************diff --git a/static/js/drafts.js b/static/js/drafts.jsindex bc3258d736f..14b1b5c2e7a 100644--- a/static/js/drafts.js+++ b/static/js/drafts.js@@ -5,6 +5,7 @@ const XDate = require("xdate");const render_draft_table_body = require("../templates/draft_table_body.hbs");+const people = require("./people");const util = require("./util");function set_count(count) {diff --git a/static/js/echo.js b/static/js/echo.jsindex e74c790cc6d..c393b5ca532 100644--- a/static/js/echo.js+++ b/static/js/echo.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const util = require("./util");// Docs: https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.htmldiff --git a/static/js/filter.js b/static/js/filter.jsindex 5ad76b59490..3eb12644f0b 100644--- a/static/js/filter.js+++ b/static/js/filter.js@@ -3,6 +3,7 @@const Handlebars = require("handlebars/runtime");const _ = require("lodash");+const people = require("./people");const util = require("./util");function zephyr_stream_name_match(message, operand) {diff --git a/static/js/global.d.ts b/static/js/global.d.tsindex 6f1dcc011a7..276b0b605eb 100644--- a/static/js/global.d.ts+++ b/static/js/global.d.ts@@ -88,7 +88,6 @@ declare let overlays: any;declare let padded_widget: any;declare let page_params: any;declare let panels: any;-declare let people: any;declare let pill_typeahead: any;declare let pm_list: any;declare let pointer: any;diff --git a/static/js/hash_util.js b/static/js/hash_util.jsindex 1964a32b553..8099f616f11 100644--- a/static/js/hash_util.js+++ b/static/js/hash_util.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+exports.get_hash_category = function (hash) {// given "#streams/subscribed", returns "streams"return hash ? hash.replace(/^#/, "").split(/\//)[0] : "";diff --git a/static/js/huddle_data.js b/static/js/huddle_data.jsindex 20a030fb7e9..c29cb138c72 100644--- a/static/js/huddle_data.js+++ b/static/js/huddle_data.js@@ -2,6 +2,8 @@const _ = require("lodash");+const people = require("./people");+const huddle_timestamps = new Map();exports.process_loaded_messages = function (messages) {diff --git a/static/js/lightbox.js b/static/js/lightbox.jsindex 050af75a12f..a410c950a63 100644--- a/static/js/lightbox.js+++ b/static/js/lightbox.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+let is_open = false;// the asset map is a map of all retrieved images and YouTube videos that are// memoized instead of being looked up multiple times.diff --git a/static/js/markdown_config.js b/static/js/markdown_config.jsindex 771d4613b95..e210e89d45a 100644--- a/static/js/markdown_config.js+++ b/static/js/markdown_config.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+/*This config is in a separate file for partlytactical reasons. We want the webapp todiff --git a/static/js/message_edit_history.js b/static/js/message_edit_history.jsindex 7b05bccc248..176ba78532c 100644--- a/static/js/message_edit_history.js+++ b/static/js/message_edit_history.js@@ -4,6 +4,8 @@ const XDate = require("xdate");const render_message_edit_history = require("../templates/message_edit_history.hbs");+const people = require("./people");+exports.fetch_and_render_message_history = function (message) {channel.get({url: "/json/messages/" + message.id + "/history",diff --git a/static/js/message_fetch.js b/static/js/message_fetch.jsindex a9d04e0dd44..3d4eff69cf0 100644--- a/static/js/message_fetch.js+++ b/static/js/message_fetch.js@@ -1,6 +1,7 @@"use strict";const huddle_data = require("./huddle_data");+const people = require("./people");const consts = {backfill_idle_time: 10 * 1000,diff --git a/static/js/message_list_view.js b/static/js/message_list_view.jsindex 29b39942f12..e520299b5ab 100644--- a/static/js/message_list_view.js+++ b/static/js/message_list_view.js@@ -8,6 +8,7 @@ const render_message_group = require("../templates/message_group.hbs");const render_recipient_row = require("../templates/recipient_row.hbs");const render_single_message = require("../templates/single_message.hbs");+const people = require("./people");const rendered_markdown = require("./rendered_markdown");const util = require("./util");diff --git a/static/js/message_live_update.js b/static/js/message_live_update.jsindex 2e0187c232d..d23d23b6d89 100644--- a/static/js/message_live_update.js+++ b/static/js/message_live_update.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+function rerender_messages_view() {for (const list of [home_msg_list, message_list.narrowed, message_list.all]) {if (list === undefined) {diff --git a/static/js/message_store.js b/static/js/message_store.jsindex df317507ee0..ae9f9d2d0cc 100644--- a/static/js/message_store.js+++ b/static/js/message_store.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const pm_conversations = require("./pm_conversations");const util = require("./util");diff --git a/static/js/narrow.js b/static/js/narrow.jsindex 3cdca871423..66b9637d0f2 100644--- a/static/js/narrow.js+++ b/static/js/narrow.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const util = require("./util");let unnarrow_times;diff --git a/static/js/narrow_state.js b/static/js/narrow_state.jsindex 3b451514295..fc8a0dc25b8 100644--- a/static/js/narrow_state.js+++ b/static/js/narrow_state.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+let current_filter;exports.reset_current_filter = function () {diff --git a/static/js/notifications.js b/static/js/notifications.jsindex 610bba75c3f..f96c24cdf9e 100644--- a/static/js/notifications.js+++ b/static/js/notifications.js@@ -5,6 +5,7 @@ const _ = require("lodash");const render_compose_notification = require("../templates/compose_notification.hbs");const render_notification = require("../templates/notification.hbs");+const people = require("./people");const settings_config = require("./settings_config");const notice_memory = new Map();diff --git a/static/js/people.js b/static/js/people.jsindex 8d5e7c5cfae..6b282b302fe 100644--- a/static/js/people.js+++ b/static/js/people.js@@ -1319,5 +1319,3 @@ exports.initialize = function (my_user_id, params) {exports.initialize_current_user(my_user_id);};--window.people = exports;diff --git a/static/js/pill_typeahead.js b/static/js/pill_typeahead.jsindex 8b8981db927..2d584802330 100644--- a/static/js/pill_typeahead.js+++ b/static/js/pill_typeahead.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const settings_data = require("./settings_data");exports.set_up = function (input, pills, opts) {diff --git a/static/js/pm_conversations.js b/static/js/pm_conversations.jsindex 34087aeb04f..d8dcd5d172e 100644--- a/static/js/pm_conversations.js+++ b/static/js/pm_conversations.js@@ -1,6 +1,7 @@"use strict";const FoldDict = require("./fold_dict").FoldDict;+const people = require("./people");const partners = new Set();diff --git a/static/js/pm_list.js b/static/js/pm_list.jsindex 010838bf589..85ba85fb6b0 100644--- a/static/js/pm_list.js+++ b/static/js/pm_list.js@@ -1,5 +1,6 @@"use strict";+const people = require("./people");const pm_conversations = require("./pm_conversations");let prior_dom;diff --git a/static/js/poll_widget.js b/static/js/poll_widget.jsindex d5f9d2476f5..3857e94942c 100644--- a/static/js/poll_widget.js+++ b/static/js/poll_widget.js@@ -3,6 +3,8 @@const render_widgets_poll_widget = require("../templates/widgets/poll_widget.hbs");const render_widgets_poll_widget_results = require("../templates/widgets/poll_widget_results.hbs");+const people = require("./people");+class PollData {// This object just holds data for a poll, although it// works closely with the widget's concept of how datadiff --git a/static/js/popovers.js b/static/js/popovers.jsindex 1433d5c4f62..fc1d7982a27 100644--- a/static/js/popovers.js+++ b/static/js/popovers.js@@ -15,6 +15,7 @@ const render_user_info_popover_content = require("../templates/user_info_popoverconst render_user_info_popover_title = require("../templates/user_info_popover_title.hbs");const render_user_profile_modal = require("../templates/user_profile_modal.hbs");+const people = require("./people");const settings_data = require("./settings_data");const util = require("./util");diff --git a/static/js/presence.js b/static/js/presence.jsindex 59cdd96c8c4..46892be5999 100644--- a/static/js/presence.js+++ b/static/js/presence.js@@ -2,6 +2,8 @@const XDate = require("xdate");+const people = require("./people");+// This module just manages data. See activity.js for// the UI of our buddy list.diff --git a/static/js/reactions.js b/static/js/reactions.jsindex 47a52b3fa22..87b11cb0985 100644--- a/static/js/reactions.js+++ b/static/js/reactions.js@@ -5,6 +5,8 @@ const _ = require("lodash");const emoji = require("../shared/js/emoji");const render_message_reaction = require("../templates/message_reaction.hbs");+const people = require("./people");+exports.view = {}; // function namespaceexports.get_local_reaction_id = function (reaction_info) {diff --git a/static/js/recent_topics.js b/static/js/recent_topics.jsindex 5a27c2eca8d..1681fd5a1f1 100644--- a/static/js/recent_topics.js+++ b/static/js/recent_topics.js@@ -6,6 +6,8 @@ const render_recent_topic_row = require("../templates/recent_topic_row.hbs");const render_recent_topics_filters = require("../templates/recent_topics_filters.hbs");const render_recent_topics_body = require("../templates/recent_topics_table.hbs");+const people = require("./people");+const topics = new Map(); // Key is stream-id:topic.let topics_widget;// Sets the number of avatars to display.diff --git a/static/js/reminder.js b/static/js/reminder.jsindex c8aedb940e1..d3b7bcf7166 100644--- a/static/js/reminder.js+++ b/static/js/reminder.js@@ -2,6 +2,7 @@const moment = require("moment-timezone");+const people = require("./people");const util = require("./util");const deferred_message_types = {diff --git a/static/js/rendered_markdown.js b/static/js/rendered_markdown.jsindex 2d8458643cc..4d18f232001 100644--- a/static/js/rendered_markdown.js+++ b/static/js/rendered_markdown.js@@ -5,6 +5,8 @@ const moment = require("moment");const copy_code_button = require("../templates/copy_code_button.hbs");+const people = require("./people");+/*rendered_markdowndiff --git a/static/js/search_suggestion.js b/static/js/search_suggestion.jsindex f3b5518d2fc..ab4f197984b 100644--- a/static/js/search_suggestion.js+++ b/static/js/search_suggestion.js@@ -3,6 +3,7 @@const Handlebars = require("handlebars/runtime");const huddle_data = require("./huddle_data");+const people = require("./people");const settings_data = require("./settings_data");exports.max_num_of_search_results = 12;diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.jsindex 25b93d922e1..6a9f1fdb4e8 100644--- a/static/js/server_events_dispatch.js+++ b/static/js/server_events_dispatch.js@@ -2,6 +2,7 @@const emoji = require("../shared/js/emoji");+const people = require("./people");const settings_config = require("./settings_config");exports.dispatch_normal_event = function dispatch_normal_event(event) {diff --git a/static/js/settings.js b/static/js/settings.jsindex 2bded384fbe..6d55cf2eda6 100644--- a/static/js/settings.js+++ b/static/js/settings.js@@ -4,6 +4,7 @@ const moment = require("moment-timezone");const render_settings_tab = require("../templates/settings_tab.hbs");+const people = require("./people");const settings_config = require("./settings_config");$("body").ready(() => {diff --git a/static/js/settings_account.js b/static/js/settings_account.jsindex 21e8cbb86ba..b5dbfaba37a 100644--- a/static/js/settings_account.js+++ b/static/js/settings_account.js@@ -6,6 +6,7 @@ const render_settings_api_key_modal = require("../templates/settings/api_key_modconst render_settings_custom_user_profile_field = require("../templates/settings/custom_user_profile_field.hbs");const render_settings_dev_env_email_access = require("../templates/settings/dev_env_email_access.hbs");+const people = require("./people");const setup = require("./setup");exports.update_email = function (new_email) {diff --git a/static/js/settings_bots.js b/static/js/settings_bots.jsindex 7f9021aaea1..276fa395ebc 100644--- a/static/js/settings_bots.js+++ b/static/js/settings_bots.js@@ -7,6 +7,8 @@ const render_edit_bot = require("../templates/edit_bot.hbs");const render_settings_edit_embedded_bot_service = require("../templates/settings/edit_embedded_bot_service.hbs");const render_settings_edit_outgoing_webhook_service = require("../templates/settings/edit_outgoing_webhook_service.hbs");+const people = require("./people");+exports.hide_errors = function () {$("#bot_table_error").hide();$(".bot_error").hide();diff --git a/static/js/settings_emoji.js b/static/js/settings_emoji.jsindex 5e255e8a346..9920c89f122 100644--- a/static/js/settings_emoji.js+++ b/static/js/settings_emoji.js@@ -4,6 +4,8 @@ const emoji = require("../shared/js/emoji");const render_admin_emoji_list = require("../templates/admin_emoji_list.hbs");const render_settings_emoji_settings_tip = require("../templates/settings/emoji_settings_tip.hbs");+const people = require("./people");+const meta = {loaded: false,};diff --git a/static/js/settings_exports.js b/static/js/settings_exports.jsindex bdd79a0da79..dc31c476f81 100644--- a/static/js/settings_exports.js+++ b/static/js/settings_exports.js@@ -4,6 +4,8 @@ const XDate = require("xdate");const render_admin_export_list = require("../templates/admin_export_list.hbs");+const people = require("./people");+const meta = {loaded: false,};diff --git a/static/js/settings_invites.js b/static/js/settings_invites.jsindex 271a0daa54c..e418a3f6323 100644--- a/static/js/settings_invites.js+++ b/static/js/settings_invites.js@@ -3,6 +3,7 @@const render_admin_invites_list = require("../templates/admin_invites_list.hbs");const render_settings_revoke_invite_modal = require("../templates/settings/revoke_invite_modal.hbs");+const people = require("./people");const settings_config = require("./settings_config");const util = require("./util");diff --git a/static/js/settings_user_groups.js b/static/js/settings_user_groups.jsindex 5157dd427c0..5e4c5861dcf 100644--- a/static/js/settings_user_groups.js+++ b/static/js/settings_user_groups.js@@ -5,6 +5,8 @@ const _ = require("lodash");const render_admin_user_group_list = require("../templates/admin_user_group_list.hbs");const render_confirm_delete_user = require("../templates/confirm_delete_user.hbs");+const people = require("./people");+const meta = {loaded: false,};diff --git a/static/js/settings_users.js b/static/js/settings_users.jsindex ba2ffb4e80e..18ce9fdee6e 100644--- a/static/js/settings_users.js+++ b/static/js/settings_users.js@@ -4,6 +4,7 @@ const render_admin_bot_form = require("../templates/admin_bot_form.hbs");const render_admin_human_form = require("../templates/admin_human_form.hbs");const render_admin_user_list = require("../templates/admin_user_list.hbs");+const people = require("./people");const settings_config = require("./settings_config");const settings_data = require("./settings_data");diff --git a/static/js/stream_create.js b/static/js/stream_create.jsindex ee09c7e1e3d..978ef3b09f7 100644--- a/static/js/stream_create.js+++ b/static/js/stream_create.js@@ -4,6 +4,8 @@ const render_announce_stream_docs = require("../templates/announce_stream_docs.hconst render_new_stream_users = require("../templates/new_stream_users.hbs");const render_subscription_invites_warning_modal = require("../templates/subscription_invites_warning_modal.hbs");+const people = require("./people");+let created_stream;exports.reset_created_stream = function () {diff --git a/static/js/stream_data.js b/static/js/stream_data.jsindex 117822269c2..b8aa626e580 100644--- a/static/js/stream_data.js+++ b/static/js/stream_data.js@@ -2,6 +2,7 @@const FoldDict = require("./fold_dict").FoldDict;const LazySet = require("./lazy_set").LazySet;+const people = require("./people");const settings_config = require("./settings_config");const util = require("./util");diff --git a/static/js/stream_edit.js b/static/js/stream_edit.jsindex 91407b09ddd..d64e2f9e3c1 100644--- a/static/js/stream_edit.js+++ b/static/js/stream_edit.js@@ -5,6 +5,7 @@ const render_stream_member_list_entry = require("../templates/stream_member_listconst render_subscription_settings = require("../templates/subscription_settings.hbs");const render_subscription_stream_privacy_modal = require("../templates/subscription_stream_privacy_modal.hbs");+const people = require("./people");const settings_config = require("./settings_config");const settings_data = require("./settings_data");const util = require("./util");diff --git a/static/js/subs.js b/static/js/subs.jsindex 3aab8a3c5ee..2edfecff733 100644--- a/static/js/subs.js+++ b/static/js/subs.js@@ -7,6 +7,7 @@ const render_subscription_settings = require("../templates/subscription_settingsconst render_subscription_table_body = require("../templates/subscription_table_body.hbs");const render_subscriptions = require("../templates/subscriptions.hbs");+const people = require("./people");const util = require("./util");exports.show_subs_pane = {diff --git a/static/js/tictactoe_widget.js b/static/js/tictactoe_widget.jsindex cdacc3305f0..78d927a1c76 100644--- a/static/js/tictactoe_widget.js+++ b/static/js/tictactoe_widget.js@@ -2,6 +2,8 @@const render_widgets_tictactoe_widget = require("../templates/widgets/tictactoe_widget.hbs");+const people = require("./people");+class TicTacToeData {me = people.my_current_user_id();square_values = new Map();diff --git a/static/js/top_left_corner.js b/static/js/top_left_corner.jsindex d1182c948e5..b924b669956 100644--- a/static/js/top_left_corner.js+++ b/static/js/top_left_corner.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+exports.update_count_in_dom = function (unread_count_elem, count) {const count_span = unread_count_elem.find(".count");const value_span = count_span.find(".value");diff --git a/static/js/transmit.js b/static/js/transmit.jsindex 5f617d4c3cf..c2401331169 100644--- a/static/js/transmit.js+++ b/static/js/transmit.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+exports.send_message = function (request, on_success, error) {channel.post({url: "/json/messages",diff --git a/static/js/typeahead_helper.js b/static/js/typeahead_helper.jsindex 18cba97bb3d..1520323747a 100644--- a/static/js/typeahead_helper.js+++ b/static/js/typeahead_helper.js@@ -8,6 +8,7 @@ const emoji = require("../shared/js/emoji");const typeahead = require("../shared/js/typeahead");const render_typeahead_list_item = require("../templates/typeahead_list_item.hbs");+const people = require("./people");const pm_conversations = require("./pm_conversations");const settings_data = require("./settings_data");const util = require("./util");diff --git a/static/js/typing.js b/static/js/typing.jsindex 6f43dce532f..d7e7bc35d94 100644--- a/static/js/typing.js+++ b/static/js/typing.js@@ -2,6 +2,8 @@const typing_status = require("../shared/js/typing_status");+const people = require("./people");+// This module handles the outbound side of typing indicators.// We detect changes in the compose box and notify the server// when we are typing. For the inbound side see typing_events.js.diff --git a/static/js/typing_events.js b/static/js/typing_events.jsindex 4ce2b98f367..277efe5201d 100644--- a/static/js/typing_events.js+++ b/static/js/typing_events.js@@ -2,6 +2,8 @@const render_typing_notifications = require("../templates/typing_notifications.hbs");+const people = require("./people");+// See docs/subsystems/typing-indicators.md for details on typing indicators.// This code handles the inbound side of typing notifications.diff --git a/static/js/ui_init.js b/static/js/ui_init.jsindex bf294450724..8249b9504dd 100644--- a/static/js/ui_init.js+++ b/static/js/ui_init.js@@ -8,6 +8,7 @@ const render_edit_content_button = require("../templates/edit_content_button.hbsconst emojisets = require("./emojisets");const markdown_config = require("./markdown_config");+const people = require("./people");const pm_conversations = require("./pm_conversations");// This is where most of our initialization takes place.diff --git a/static/js/unread.js b/static/js/unread.jsindex 6744226fb08..78d4ba45079 100644--- a/static/js/unread.js+++ b/static/js/unread.js@@ -1,6 +1,7 @@"use strict";const FoldDict = require("./fold_dict").FoldDict;+const people = require("./people");const util = require("./util");// The unread module tracks the message IDs and locations of thediff --git a/static/js/user_events.js b/static/js/user_events.jsindex 11d4a053d37..5410fbd5bff 100644--- a/static/js/user_events.js+++ b/static/js/user_events.js@@ -4,6 +4,7 @@// server_events.js simple while breaking some circular// dependencies that existed when this code was in people.js.// (We should do bot updates here too.)+const people = require("./people");const settings_config = require("./settings_config");exports.update_person = function update(person) {diff --git a/static/js/user_pill.js b/static/js/user_pill.jsindex 084483e93b3..80f76045cde 100644--- a/static/js/user_pill.js+++ b/static/js/user_pill.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+// This will be used for pills for things like composing PMs// or adding users to a stream/group.diff --git a/static/js/user_status_ui.js b/static/js/user_status_ui.jsindex c6641622fb9..5e3abc1cd21 100644--- a/static/js/user_status_ui.js+++ b/static/js/user_status_ui.js@@ -1,5 +1,7 @@"use strict";+const people = require("./people");+exports.input_field = function () {return $(".user_status_overlay input.user_status");};