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

@@ -468,7 +468,7 @@ export function dispatch_normal_event(event) {
case "update":
user_events.update_person(event.person);
settings_account.maybe_update_deactivate_account_button();
if (people.user_is_bot(event.person.user_id)) {
if (people.is_valid_bot_user(event.person.user_id)) {
settings_users.update_bot_data(event.person.user_id);
}
break;