people: Gracefully fail for invalid users in user_is_bot.

Many of these code paths largely expect it to be a valid user ID, so
we could raise an exception if the user ID is invalid, but probably
gracefully proceeding is reasonable for the callers.
This commit is contained in:
evykassirer
2024-02-01 14:32:33 -08:00
committed by Tim Abbott
parent ccc106dca3
commit a46c4f7b7e
3 changed files with 6 additions and 6 deletions

View File

@@ -148,7 +148,7 @@ export const update_person = function update(person) {
buddy_list.maybe_remove_user_id({user_id: person.user_id});
}
settings_account.maybe_update_deactivate_account_button();
if (people.user_is_bot(person.user_id)) {
if (people.is_valid_bot_user(person.user_id)) {
settings_users.update_bot_data(person.user_id);
}
}