mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
minor: Rename function to get_active_humans().
Saying `human_persons` is a bit redundant (although kind of an artifact of our legacy use of `person` when we really mean `user`.)
This commit is contained in:
@@ -142,10 +142,10 @@ run_test('basics', () => {
|
||||
|
||||
// Reactivating issac
|
||||
people.add_in_realm(isaac);
|
||||
const active_human_persons = people.get_active_human_persons();
|
||||
assert.equal(active_human_persons.length, 2);
|
||||
const active_humans = people.get_active_humans();
|
||||
assert.equal(active_humans.length, 2);
|
||||
assert.deepEqual(
|
||||
active_human_persons.sort((p) => p.user_id),
|
||||
active_humans.sort((p) => p.user_id),
|
||||
[me, isaac]);
|
||||
});
|
||||
|
||||
|
||||
@@ -689,7 +689,7 @@ exports.get_realm_persons = function () {
|
||||
return Array.from(active_user_dict.values());
|
||||
};
|
||||
|
||||
exports.get_active_human_persons = function () {
|
||||
exports.get_active_humans = function () {
|
||||
const humans = [];
|
||||
|
||||
for (const user of active_user_dict.values()) {
|
||||
|
||||
@@ -389,7 +389,7 @@ exports.set_up = function () {
|
||||
const li = $(e.currentTarget).closest('li');
|
||||
const bot_id = parseInt(li.find('.bot_info').attr('data-user-id'), 10);
|
||||
const bot = bot_data.get(bot_id);
|
||||
const users_list = people.get_active_human_persons();
|
||||
const users_list = people.get_active_humans();
|
||||
$("#edit_bot").empty();
|
||||
$("#edit_bot").append(render_edit_bot({
|
||||
bot: bot,
|
||||
|
||||
@@ -306,7 +306,7 @@ function open_user_info_form_modal(person) {
|
||||
if (person.is_bot) {
|
||||
// Dynamically add the owner select control in order to
|
||||
// avoid performance issues in case of large number of users.
|
||||
const users_list = people.get_active_human_persons();
|
||||
const users_list = people.get_active_humans();
|
||||
const owner_select = $(render_bot_owner_select({users_list: users_list}));
|
||||
owner_select.val(bot_data.get(person.user_id).owner || "");
|
||||
modal_container.find(".edit_bot_owner_container").append(owner_select);
|
||||
|
||||
Reference in New Issue
Block a user