mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
people: Add common function for getting active human users.
This commit is contained in:
committed by
Tim Abbott
parent
fd71f7282d
commit
16357fc84a
@@ -617,6 +617,13 @@ exports.get_realm_persons = function () {
|
||||
return active_user_dict.values();
|
||||
};
|
||||
|
||||
exports.get_active_human_persons = function () {
|
||||
var human_persons = exports.get_realm_persons().filter(function (person) {
|
||||
return !person.is_bot;
|
||||
});
|
||||
return human_persons;
|
||||
};
|
||||
|
||||
exports.get_active_user_ids = function () {
|
||||
// This includes active users and active bots.
|
||||
return active_user_dict.keys();
|
||||
|
||||
Reference in New Issue
Block a user