user_pill: Do not show deactivated for inaccessible users.

This commit adds code to consider inaccessible users as active
for user pills as we do not have any information about whether
they are active or not. We do not want to incorrectly show
"deactivated" for inaccessible users.
This commit is contained in:
Sahil Batra
2023-12-07 22:03:04 +05:30
committed by Tim Abbott
parent 75ceba6600
commit 386cef1b7e

View File

@@ -69,7 +69,12 @@ export function create_item_from_email(
};
// We pass deactivated true for a deactivated user
if (!people.is_person_active(user.user_id)) {
//
// We consider inaccessible users as active to avoid
// falsely showing the user as deactivated as we do
// not have any information about whether they are
// active or not.
if (!people.is_person_active(user.user_id) && !user.is_inaccessible_user) {
item.deactivated = true;
}