mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
popovers: Don't show bots as deactivated in user popovers.
Apparently this is a bug that slipped in when we started showing normal users as deactivated in the user popovers: all bot users were treated that way as well. We'll want to do #7153 as a follow-up to get things fully working how we want them.
This commit is contained in:
@@ -530,8 +530,19 @@ exports.realm_get = function realm_get(email) {
|
||||
return realm_people_dict.get(person.user_id);
|
||||
};
|
||||
|
||||
exports.realm_user_is_active_human = function (id) {
|
||||
return !!realm_people_dict.get(id);
|
||||
exports.realm_user_is_active_human_or_bot = function (id) {
|
||||
if (realm_people_dict.get(id) !== undefined) {
|
||||
return true;
|
||||
}
|
||||
// TODO: Technically, we should probably treat deactivated bots
|
||||
// like deactivated users here. But we don't have the data to do
|
||||
// that. See #7153 for notes on fixing this.
|
||||
var person = exports.get_person_from_user_id(id);
|
||||
if (person === undefined) {
|
||||
blueslip.error("Unexpectedly invalid user ID in user popover query " + id);
|
||||
return false;
|
||||
}
|
||||
return !!person.is_bot;
|
||||
};
|
||||
|
||||
exports.get_all_persons = function () {
|
||||
|
||||
Reference in New Issue
Block a user